/* ===== PREMIUM KEYS SECTION ===== */
.premium-keys-section {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.keys-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.keys-header-content {
    margin-bottom: 1.5rem;
}

.keys-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.keys-title svg {
    width: 28px;
    height: 28px;
    color: #6366f1;
}

.keys-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.keys-header-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-left: 2.5rem;
}

.keys-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.key-stat-item {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.key-stat-item.available {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.key-stat-item.used {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.key-stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.key-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.key-stat-item.available .key-stat-value {
    color: #22c55e;
}

.key-stat-item.used .key-stat-value {
    color: #ef4444;
}

.keys-controls {
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.keys-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-generate-key {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    align-self: flex-start;
}

.btn-generate-key:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-generate-key:active {
    transform: translateY(0);
}

.btn-generate-key svg {
    width: 20px;
    height: 20px;
}

.generated-key-display {
    padding: 1.5rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.generated-key-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.generated-key-content > svg {
    width: 32px;
    height: 32px;
    color: #22c55e;
    flex-shrink: 0;
}

.generated-key-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.generated-key-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.generated-key-code {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #22c55e;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 1px;
}

.btn-copy-key {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-copy-key:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn-copy-key svg {
    width: 20px;
    height: 20px;
    display: block;
}

.keys-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.keys-search {
    position: relative;
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
}

.keys-search > svg {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.keys-search input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.keys-search input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.clear-keys-search {
    position: absolute;
    right: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.clear-keys-search:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.clear-keys-search svg {
    width: 18px;
    height: 18px;
    display: block;
}

.keys-filter-select {
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
}

.keys-filter-select:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.08);
}

.keys-filter-select option {
    background: #1a1b26;
    color: #fff;
}

.keys-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.keys-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.6);
}

.key-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.key-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s;
}

.key-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.key-card:hover::before {
    opacity: 1;
}

.key-card.used {
    border-color: rgba(239, 68, 68, 0.2);
}

.key-card.used::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.key-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.key-status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.key-status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.key-status-badge.available {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.key-status-badge.used {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.key-actions-menu {
    display: flex;
    gap: 0.5rem;
}

.key-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.key-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.key-action-btn svg {
    width: 16px;
    height: 16px;
}

.key-code-display {
    margin-bottom: 1rem;
}

.key-code-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.key-code {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-weight: 600;
    letter-spacing: 1px;
}

.key-code-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-copy-code {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.btn-copy-code:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-copy-code svg {
    width: 16px;
    height: 16px;
    display: block;
}

.key-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.key-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.key-info-icon {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.key-info-label {
    color: rgba(255, 255, 255, 0.5);
    min-width: 80px;
}

.key-info-value {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.key-info-value.user {
    color: #6366f1;
}

.keys-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.4);
}

.keys-empty svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.keys-empty p {
    margin: 0;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .keys-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .keys-header {
        padding: 1.5rem;
    }

    .keys-controls {
        padding: 1rem 1.5rem;
    }

    .keys-grid {
        padding: 1.5rem;
        grid-template-columns: 1fr;
    }

    .keys-filters {
        flex-direction: column;
    }

    .keys-search {
        min-width: 100%;
    }

    .keys-filter-select {
        width: 100%;
    }

    .generated-key-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-copy-key {
        align-self: stretch;
    }
}
