body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

#loading-popup {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 999;
}

#loading-popup p {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #FF6B35;
    margin: 0 0 10px 0;
    font-size: 2.5em;
}

.header p {
    color: #666;
    margin: 0;
    font-size: 1.1em;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #FF6B35;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
}

.search-container {
    margin-bottom: 20px;
    grid-column: 1;
}

#reward-list {
    grid-column: 1;
}

.log-panel {
    grid-column: 2;
}

#search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

#reward-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.reward-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.reward-item img {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #f8f8f8;
    padding: 0;
    box-sizing: border-box;
}

.reward-info {
    flex: 1;
}

.reward-item h3 {
    margin: 0 0 5px 0;
    color: #333;
}

.reward-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.reward-price {
    margin-top: 8px !important;
    color: #FF6B35 !important;
    font-weight: bold;
    font-size: 16px !important;
}

.reward-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    border: none;
    background: #FF6B35;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
}

.quantity-control input {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
}

.claim-button {
    background: #FF6B35;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
    min-width: 120px;
}

.claim-button:hover {
    background: #e55a2b;
}

.claim-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.claim-button.success {
    background: #4CAF50;
}

.claim-button.claiming {
    background: #ff9800;
    animation: pulse 1.5s infinite;
    cursor: not-allowed;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.log-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.log-header {
    background: #FF6B35;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-clear {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.log-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.log-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    border-left: 4px solid;
    font-size: 14px;
}

.log-success {
    background: #e8f5e8;
    border-left-color: #4CAF50;
    color: #2e7d32;
}

.log-error {
    background: #ffeaea;
    border-left-color: #f44336;
    color: #c62828;
}

.log-warning {
    background: #fff3e0;
    border-left-color: #ff9800;
    color: #e65100;
}

.log-info {
    background: #e3f2fd;
    border-left-color: #2196f3;
    color: #1565c0;
}

.log-retry {
    background: #f3e5f5;
    border-left-color: #9c27b0;
    color: #6a1b9a;
}

.log-timestamp {
    font-size: 11px;
    opacity: 0.7;
    float: right;
}

.success-message,
.error-message {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    text-align: center;
}

.success-message {
    background: #4CAF50;
    color: white;
}

.error-message {
    background: #f44336;
    color: white;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #FF6B35, #e55a2b);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill.animated {
    background: linear-gradient(45deg, #FF6B35, #e55a2b, #FF6B35, #e55a2b);
    background-size: 40px 40px;
    animation: progress-animate 2s linear infinite;
}

@keyframes progress-animate {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 40px 0;
    }
}

.retry-counter {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .reward-item {
        flex-direction: column;
        text-align: center;
    }

    .stats-bar {
        flex-direction: column;
        gap: 10px;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal h2 {
    color: #FF6B35;
    margin-bottom: 20px;
}

.modal input[type="text"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.modal button {
    background: #FF6B35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.modal button:hover {
    background: #e55a2b;
}

#license-status {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#license-status h3 {
    color: #FF6B35;
    margin: 0 0 15px 0;
    font-size: 1.5em;
}

#license-info {
    display: grid;
    gap: 10px;
}

#license-info p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

#license-info p:last-child {
    border-bottom: none;
}

#license-info p strong {
    color: #666;
}

#license-info p span {
    color: #FF6B35;
    font-weight: bold;
}

#claim-settings {
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#claim-count-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#claim-progress {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

#progress-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

#progress-text {
    text-align: center;
    color: #6c757d;
    font-size: 0.9em;
}

.button-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.stop-button {
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.stop-button:hover {
    background-color: #cc0000;
}

.no-results {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    color: #666;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.update-banner {
    background: #ffcc00;
    color: #333;
    text-align: center;
    padding: 12px;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 2px solid #e0b800;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}