/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
}

/* Icon Base: make inline SVG size follow font-size */
/* Use currentColor so icons inherit text color */
.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    fill: currentColor;
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    color: #666;
    font-weight: 500;
    margin-bottom: 10px;
}

.loading-subtitle {
    font-size: 14px;
    color: #999;
    text-align: center;
    max-width: 300px;
    line-height: 1.5;
}

/* Main content hidden during loading */
.main-content.loading {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.main-content.loaded {
    opacity: 1;
}

/* Header Styles */
.header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: relative;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-selector {
    position: relative;
    display: inline-block;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    justify-content: space-between;
}

.language-toggle:hover {
    background: #f8f8f8;
    border-color: #ff8c42;
}

.globe-icon {
    font-size: 16px;
    color: #666;
}

.chevron-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.language-selector.open .chevron-icon {
    transform: rotate(180deg);
}

.current-lang {
    font-weight: 500;
    color: #333;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 4px;
}

.language-selector.open .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: #f8f8f8;
}

.language-option:hover:first-child {
    border-radius: 8px 8px 0 0;
}

.language-option:hover:last-child {
    border-radius: 0 0 8px 8px;
}

.language-option:hover:only-child {
    border-radius: 8px;
}

.language-option.active {
    background: #fff3e0;
    color: #ff8c42;
}

.language-option.active:first-child {
    border-radius: 8px 8px 0 0;
    margin: -1px -1px 0 -1px;
    padding: 11px 13px 10px 13px;
    border: 1px solid #ddd;
    border-bottom: none;
}

.language-option.active:last-child {
    border-radius: 0 0 8px 8px;
    margin: 0 -1px -1px -1px;
    padding: 10px 13px 11px 13px;
    border: 1px solid #ddd;
    border-top: none;
}

.language-option.active:only-child {
    border-radius: 8px;
    margin: -1px;
    padding: 11px 13px;
    border: 1px solid #ddd;
}

.lang-flag {
    font-size: 16px;
}

.lang-name {
    font-size: 14px;
    font-weight: 500;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 24px;
    color: #ff8c42;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.nav-tabs {
    display: flex;
    gap: 30px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #888;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tab.active {
    color: #ff8c42;
    border-bottom-color: #ff8c42;
}

.nav-tab:hover {
    color: #ff8c42;
}

.nav-icon {
    font-size: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #ff8c42;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.user-avatar:hover {
    background-color: #e67e22;
    transform: scale(1.05);
}

/* User Menu Dropdown */
.user-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 2000;
    margin-top: 8px;
}

.user-menu.show {
    display: block !important;
}

@keyframes userMenuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.user-menu-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 240px;
    overflow: hidden;
}

/* User Info Section */
.user-info-section {
    padding: 12px 20px;
    background: #f8f8f8;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.user-email {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* Menu Dividers */
.user-menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0;
}

/* Menu Items */
.user-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.user-menu-item:hover {
    background: #f8f8f8;
}

.user-menu-item:active {
    background: #f0f0f0;
}

.user-menu-icon {
    font-size: 16px;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.user-menu-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Logout Item Styling - Same as other menu items */
.user-menu-logout .user-menu-text {
    color: #333;
    font-weight: 500;
}

.user-menu-logout:hover {
    background: #f8f8f8;
}

.user-menu-logout:hover .user-menu-text {
    color: #333;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #888;
}

/* Metrics Section */
.metrics-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.metric-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.metric-icon {
    font-size: 16px;
    color: #888;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.metric-date,
.metric-subtitle {
    font-size: 14px;
    color: #888;
}

/* API Key Management Section */
.api-key-management-section {
    margin-bottom: 30px;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
    align-items: start;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Make both cards in content grid have equal height */
.content-grid .card {
    display: flex;
    flex-direction: column;
    min-height: 270px;
}

/* Make Account Information and Plan Management cards have equal height */
.content-grid .left-column .card:last-child,
.content-grid .right-column .card:last-child {
    min-height: 350px !important;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.card-icon {
    font-size: 16px;
    color: #888;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.card-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

/* API Key Section */
.api-key-section {
    margin-top: 20px;
}

.api-key-input {
    display: flex;
    align-items: center;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.api-key-field {
    flex: 1;
    border: none;
    background: transparent;
    color: #333;
    font-size: 14px;
    outline: none;
}

.copy-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #f8f8f8;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    justify-content: center;
    text-decoration: none;
}

/* API Key Management specific styles for full width layout */
.api-key-management-section .action-buttons {
    justify-content: center;
    margin: 0 auto;
}

.api-key-management-section .action-btn {
    flex: 1;
    min-width: 150px;
}

.action-btn:hover {
    background: #f8f8f8;
    border-color: #ff8c42;
}

/* Auto configuration buttons - wider by 50px */
.action-btn[href*="codex-config"] {
    min-width: 200px;
}

.btn-icon {
    font-size: 14px;
}

/* Account Information */
.account-info {
    margin-top: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.info-value {
    font-size: 14px;
    color: #333;
}

.info-value.highlight {
    color: #ff8c42;
    font-weight: 600;
}

/* Navigation Links */
.nav-links {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 0;
    flex: 1;
    align-items: center;
}

.nav-link {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 16px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: flex-start;
}

.nav-link:hover {
    background: #f8f8f8;
    border-color: #ff8c42;
}

.nav-link-icon {
    font-size: 16px;
    color: #888;
}

/* Plan Management */
.plan-section {
    margin-top: 12px;
}

.activate-btn {
    width: 100%;
    background: #ff8c42;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.activate-btn:hover {
    background: #e67e22;
}

.current-plan {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.plan-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.plan-status {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.cancel-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.cancel-link:hover {
    color: #ff8c42;
}

.plan-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* No Plan Message */
.no-plan-message {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.no-plan-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.no-plan-icon {
    font-size: 24px;
    opacity: 0.6;
}

.no-plan-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.detail-label {
    font-size: 14px;
    color: #888;
}

.detail-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.get-plan-btn {
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.get-plan-btn:hover {
    background: #f8f8f8;
    border-color: #ff8c42;
}

/* Support Section */
.support-section {
    margin-top: 0;
}

.support-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.support-link {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-link:hover {
    background: #f8f8f8;
    border-color: #ff8c42;
}

/* Configure Codex Modal */
.configure-modal {
    max-width: 1000px !important;
    width: 95% !important;
    height: 80vh !important;
    max-height: 80vh !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.configure-modal .modal-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 16px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.configure-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.configure-modal .modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.configure-modal .modal-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.guide-section {
    margin-top: 20px;
}

.guide-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.guide-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.4;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: none;
    overflow: visible;
}

.step-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.step-card:hover {
    border-color: #ff8c42;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.1);
}

.step-card.active {
    border-color: #ff8c42;
    background: #fff;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.15);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #ff8c42;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.step-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.step-icon .icon {
    width: 20px;
    height: 20px;
    color: #666;
}

.step-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.step-chevron {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.step-card.active .step-chevron {
    transform: rotate(180deg);
}

.step-content {
    display: none;
    margin-top: 16px;
}

.step-card.active .step-content {
    display: block;
}

.step-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.4;
}

.code-block {
    position: relative;
    background: #f1f3f4;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: auto;
}

.code-block code {
    background: none;
    padding: 0;
    color: #333;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-block .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-block .copy-btn .icon {
    width: 14px;
    height: 14px;
    color: #666;
}

.code-block .copy-btn:hover {
    background: #f8f8f8;
    opacity: 1;
}

.code-block:hover .copy-btn {
    opacity: 1;
}

/* Footer */
.footer {
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    margin-top: 60px;
    padding: 40px 0 20px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column:first-child {
    max-width: 300px;
}

.footer-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.footer-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-copyright {
    font-size: 12px;
    color: #888;
}

.footer-heading {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ff8c42;
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
    justify-content: flex-end;
}

.footer-bottom-links a {
    color: #888;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #ff8c42;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        flex-wrap: wrap;
        height: auto;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .nav-tabs {
        gap: 20px;
        margin: 15px 0;
    }

    .main-content {
        padding: 20px 15px;
    }

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

    .metrics-section {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        min-width: auto;
    }

    .action-btn[href*="codex-config"] {
        min-width: auto;
    }

    .api-key-management-section .action-buttons {
        max-width: 100%;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-link {
        width: 100%;
    }

    .support-links {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    /* User menu responsive */
    .user-menu {
        right: 15px;
        min-width: 220px;
    }

    .user-menu-content {
        min-width: 220px;
    }

    .user-info-section {
        padding: 14px 16px;
    }

    .user-menu-item {
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 24px;
    }

    .metric-value {
        font-size: 24px;
    }

    .card {
        padding: 16px;
    }

    .main-content {
        padding: 15px 10px;
    }
}

/* Logout Button */
.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 12px;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close {
    color: #888;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background-color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #ff8c42;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.form-input::placeholder {
    color: #999;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-cancel {
    flex: 1;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.btn-activate {
    flex: 1;
    background: #ff8c42;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-activate:hover {
    background: #e67e22;
}

.btn-activate:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.purchase-section {
    margin-bottom: 24px;
}

.btn-purchase {
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-purchase:hover {
    background: #f8f8f8;
    border-color: #ff8c42;
}

.purchase-icon {
    font-size: 16px;
}

.activation-instructions {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 16px;
}

.instructions-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.instructions-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.instructions-list li {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    position: relative;
    line-height: 1.4;
}

.instructions-list li:before {
    content: "•";
    color: #ff8c42;
    font-weight: bold;
    position: absolute;
    left: -16px;
}

.instructions-list li:last-child {
    margin-bottom: 0;
}

/* Modal responsive design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .modal-header {
        padding: 20px 20px 16px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-activate {
        flex: none;
    }
}

/* Custom Dialog Styles */
.custom-dialog {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.custom-dialog-content {
    background-color: white;
    margin: 15% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: dialogSlideIn 0.3s ease-out;
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.custom-dialog-header {
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.custom-dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.custom-dialog-body {
    padding: 20px 24px 16px 24px;
}

.custom-dialog-message {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

.custom-dialog-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background-color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.custom-dialog-input:focus {
    outline: none;
    border-color: #ff8c42;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.custom-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px 20px 24px;
    margin-top: 0;
}

.custom-dialog-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 90px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.custom-dialog-btn-primary {
    background: #ff8c42;
    color: white;
}

.custom-dialog-btn-primary:hover {
    background: #e67e22;
}

.custom-dialog-btn-secondary {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.custom-dialog-btn-secondary:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.custom-dialog-btn-danger {
    background: #dc3545;
    color: white;
}

.custom-dialog-btn-danger:hover {
    background: #c82333;
}

/* Custom dialog responsive design */
@media (max-width: 768px) {
    .custom-dialog-content {
        margin: 20% auto;
        width: 95%;
    }

    .custom-dialog-header {
        padding: 16px 20px 12px 20px;
    }

    .custom-dialog-body {
        padding: 16px 20px 12px 20px;
    }

    .custom-dialog-title {
        font-size: 16px;
    }

    .custom-dialog-actions {
        flex-direction: column;
        padding: 12px 20px 16px 20px;
        gap: 8px;
    }

    .custom-dialog-btn {
        width: 100%;
        height: 44px;
    }
}