*, *::before, *::after {
    box-sizing: border-box;
}
:root {
    --primary-color: #ff8c42; --primary-hover: #e67a35; --secondary-color: #f0f2f5;
    --text-color: #1d1d1f; --border-color: #d2d2d7; --success-bg: #e5f7ed;
    --success-border: #a3e9a4; --error-bg: #fdecea; --error-border: #f9bdbb;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
}
html {
    overflow-x: hidden;
}
body {
    font-family: var(--font-family); 
    background: linear-gradient(to bottom, #ffffff, #ff8c42);
    color: var(--text-color);
    margin: 0; padding: 20px; display: flex; flex-direction: column; align-items: center; min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}
header { 
    text-align: center; margin-bottom: 30px; 
    display: flex; align-items: center; justify-content: space-between; 
    gap: 20px; width: 100%; 
    flex-wrap: wrap;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
header img { max-width: 156px; height: auto; margin-left: 0; }
.logo-mobile { display: none; }
.logo-desktop { display: block; }
header h1 { font-size: 2.5rem; color: var(--primary-color); margin: 0; }
header p { font-size: 1.1rem; color: #6e6e73; margin: 0; }
.header-right {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    margin-left: auto;
}
/* What is COPYFLARE Modal */
.what-is-copyflare-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
.what-is-copyflare-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
    border: 3px solid var(--primary-color);
    text-align: center;
}
.what-is-copyflare-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}
.what-is-copyflare-modal-close:hover {
    background: #e0e0e0;
    color: #333;
    transform: scale(1.1);
}
.what-is-copyflare-modal-body {
    padding: 0;
}
.what-is-copyflare-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 20px 0;
    line-height: 1.2;
}
.what-is-copyflare-subheading {
    font-size: 1.3rem;
    color: #4a4a4a;
    margin: 0 0 15px 0;
    line-height: 1.5;
    font-weight: 500;
}
.what-is-copyflare-features {
    font-size: 1.1rem;
    color: #6e6e73;
    margin: 0 0 40px 0;
    line-height: 1.6;
}
/* How it Works inside Modal */
.how-it-works-modal {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}
.how-it-works-modal .how-it-works-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 30px 0;
}
.how-it-works-modal .how-it-works-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    align-items: start;
    text-align: center;
}
.how-it-works-modal .how-it-works-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.how-it-works-modal .step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}
.how-it-works-modal .step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 8px 0;
}
.how-it-works-modal .step-description {
    font-size: 0.9rem;
    color: #6e6e73;
    margin: 0;
    line-height: 1.5;
}
/* Why Love Copyflare inside Modal */
.why-love-copyflare-modal {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}
.why-love-copyflare-modal .why-love-copyflare-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 30px 0;
}
.why-love-copyflare-modal .why-love-copyflare-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}
.why-love-copyflare-modal .benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.why-love-copyflare-modal .benefit-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.why-love-copyflare-modal .benefit-icon {
    font-size: 2rem;
    flex-shrink: 0;
}
.why-love-copyflare-modal .benefit-content {
    flex: 1;
}
.why-love-copyflare-modal .benefit-text {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}
/* What is COPYFLARE Modal Responsive */
@media (max-width: 768px) {
    .what-is-copyflare-modal-content {
        padding: 30px 20px;
        max-width: 90%;
    }
    .what-is-copyflare-heading {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    .what-is-copyflare-subheading {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    .what-is-copyflare-features {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    .how-it-works-modal {
        margin-top: 30px;
        padding-top: 30px;
    }
    .how-it-works-modal .how-it-works-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    .how-it-works-modal .how-it-works-steps {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .how-it-works-modal .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    .how-it-works-modal .step-title {
        font-size: 1rem;
    }
    .how-it-works-modal .step-description {
        font-size: 0.85rem;
    }
    .why-love-copyflare-modal {
        margin-top: 30px;
        padding-top: 30px;
    }
    .why-love-copyflare-modal .why-love-copyflare-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    .why-love-copyflare-modal .why-love-copyflare-benefits {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .why-love-copyflare-modal .benefit-item {
        padding: 12px;
    }
    .why-love-copyflare-modal .benefit-icon {
        font-size: 1.5rem;
    }
    .why-love-copyflare-modal .benefit-text {
        font-size: 0.9rem;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .what-is-copyflare-heading {
        font-size: 2.2rem;
    }
    .what-is-copyflare-subheading {
        font-size: 1.2rem;
    }
    .how-it-works-modal .how-it-works-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Hamburger Menu Button */
.hamburger-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}
.hamburger-menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}
.hamburger-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}
.hamburger-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}
/* Mobile Menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 200px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 10001;
    transition: right 0.3s ease;
    padding: 80px 20px 20px;
    overflow-y: auto;
    margin: 0;
    padding-right: 20px;
}
.mobile-menu.active {
    right: 0 !important;
    margin-right: 0 !important;
}
.mobile-menu-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
    text-align: center;
}
.mobile-menu-link:hover {
    background: rgba(255, 140, 66, 0.1);
    color: var(--primary-color);
}
.mobile-menu-link.pricing-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff !important;
}
.mobile-menu-link.pricing-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}
.mobile-menu-link.faq-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff !important;
}
.mobile-menu-link.faq-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}
.mobile-menu-link button,
.mobile-menu-link[type="button"] {
    background: none;
    border: none;
    width: 100%;
    text-align: center;
    font-family: var(--font-family);
    cursor: pointer;
}
/* Header Credit Status Section */
.header-credit-status-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #f0f0f0;
    min-width: 300px;
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.header-credit-status-display {
    display: flex; align-items: center; gap: 8px;
    flex-shrink: 0;
}
.header-status-label {
    font-size: 0.85rem; color: #666; font-weight: 600;
}
.header-status-value {
    font-size: 1rem; font-weight: 800; padding: 4px 12px;
    border-radius: 6px;
    white-space: nowrap;
}
.header-status-value.free {
    color: #27ae60; background: #e5f7ed;
}
.header-status-value.premium {
    color: var(--primary-color); background: #fff8f3;
}
.header-credit-balance-display {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.9rem; font-weight: 700; color: var(--primary-color);
    flex-shrink: 0;
}
.header-balance-label { font-size: 0.8rem; color: #666; font-weight: 600; }
.header-balance-value { font-size: 1.1rem; font-weight: 800; }
.header-balance-unit { font-size: 0.8rem; color: #666; font-weight: 600; }
.header-credit-actions {
    display: flex; gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}
.header-credit-code-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff; font-size: 0.8rem; padding: 10px 16px;
    border: none; border-radius: 8px; cursor: pointer; font-weight: 700;
    transition: all 0.2s; text-transform: uppercase; letter-spacing: 0.5px;
    white-space: nowrap;
}
.header-credit-code-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}
.header-disconnect-credits-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff; font-size: 0.75rem; padding: 10px 16px;
    border: none; border-radius: 8px; cursor: pointer; font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}
.header-disconnect-credits-btn:hover {
    background: linear-gradient(135deg, #ec7063 0%, #e74c3c 100%);
    transform: translateY(-1px);
}
.header-active-links-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff; font-size: 0.75rem; padding: 10px 16px;
    border: none; border-radius: 8px; cursor: pointer; font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}
.header-active-links-btn:hover {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Active Links Modal */
.active-links-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
.active-links-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
    border: 3px solid #3498db;
}
.active-links-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.active-links-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}
.active-links-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 25px 0;
    text-align: center;
}
.active-links-modal-body {
    margin-top: 20px;
}
.active-links-loading {
    text-align: center;
    padding: 40px 20px;
}
.active-links-loading p {
    margin-top: 15px;
    color: #666;
    font-size: 1rem;
}
.active-links-error {
    background: #fdecea;
    border: 2px solid #f9bdbb;
    color: #c0392b;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}
.active-links-content {
    margin-top: 20px;
}
.active-links-count {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}
.active-links-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.active-link-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
.active-link-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}
.active-link-code {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 8px;
}
.active-link-name {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 8px;
    word-break: break-word;
}
.active-link-expires {
    font-size: 0.9rem;
    color: #e74c3c;
    font-weight: 600;
}
.active-link-info {
    flex: 1;
    min-width: 0;
}
.active-link-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}
.active-link-download-btn {
    padding: 8px 16px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.active-link-download-btn:hover {
    background: #219a52;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}
.active-link-delete-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.active-link-delete-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}
.active-link-delete-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.active-links-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* Credit Code Modal */
.credit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.credit-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
    border: 3px solid var(--primary-color);
}
.credit-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.credit-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}
.credit-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 20px 0;
    text-align: center;
}
.credit-modal-body {
    margin-top: 20px;
}
.credit-input-group {
    margin-bottom: 20px;
}
.credit-input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.credit-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.credit-modal-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.2);
}
.credit-modal-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.credit-modal-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 15px 0;
}
.credit-modal-buy-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.credit-modal-buy-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Disconnect Confirmation Modal */
.disconnect-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
.disconnect-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
    border: 3px solid #e74c3c;
}
.disconnect-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.disconnect-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}
.disconnect-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 25px 0;
    text-align: center;
}
.disconnect-modal-body {
    text-align: center;
}
.disconnect-modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}
.disconnect-modal-message {
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 25px 0;
    font-weight: 600;
}
.disconnect-modal-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}
.disconnect-modal-info p {
    font-size: 0.9rem;
    color: #555;
    margin: 10px 0;
    line-height: 1.6;
}
.disconnect-modal-info p:first-child {
    margin-top: 0;
}
.disconnect-modal-info p:last-child {
    margin-bottom: 0;
}
.disconnect-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}
.disconnect-modal-cancel-btn,
.disconnect-modal-confirm-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    max-width: 200px;
}
.disconnect-modal-cancel-btn {
    background: #f0f0f0;
    color: #333;
}
.disconnect-modal-cancel-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}
.disconnect-modal-confirm-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
}
.disconnect-modal-confirm-btn:hover {
    background: linear-gradient(135deg, #ec7063 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* Delete Link Modal */
.delete-link-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
.delete-link-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
    border: 3px solid #e74c3c;
}
.delete-link-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.delete-link-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}
.delete-link-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 25px 0;
    text-align: center;
}
.delete-link-modal-body {
    text-align: center;
}
.delete-link-modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}
.delete-link-modal-message {
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 25px 0;
    font-weight: 600;
}
.delete-link-modal-info {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}
.delete-link-modal-info p {
    font-size: 0.9rem;
    color: #856404;
    margin: 10px 0;
    line-height: 1.6;
}
.delete-link-modal-info p:first-child {
    margin-top: 0;
}
.delete-link-modal-info p:last-child {
    margin-bottom: 0;
}
.delete-link-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}
.delete-link-modal-cancel-btn,
.delete-link-modal-confirm-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    max-width: 200px;
}
.delete-link-modal-cancel-btn {
    background: #f0f0f0;
    color: #333;
}
.delete-link-modal-cancel-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}
.delete-link-modal-confirm-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
}
.delete-link-modal-confirm-btn:hover {
    background: linear-gradient(135deg, #ec7063 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.container { display: flex; flex-wrap: wrap; gap: 30px; width: 100%; max-width: 1500px; overflow: hidden; }
.card {
    background-color: #ffffff; border-radius: 12px; box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    padding: 30px; flex: 1; min-width: 320px; display: flex; flex-direction: column;
}
.card:first-child {
    flex: 1.5; /* Step 1 card is 50% wider */
}
h2 {
    font-size: 1.5rem; color: var(--text-color); border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px; margin-top: 0; margin-bottom: 25px;
}
.form-group { margin-bottom: 25px; }
label, .legend { display: block; margin-bottom: 10px; font-weight: 600; font-size: 0.9rem; color: #333; }
input[type="text"], input[type="password"], input[type="date"], textarea {
    width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px;
    box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s; font-family: var(--font-family);
}
textarea { resize: vertical; min-height: 120px; }

/* Custom File Input Styling */
.file-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}
.file-input-wrapper input[type="file"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}
.file-input-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.file-input-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}
.file-input-btn:active {
    transform: translateY(0);
}
.file-input-btn svg {
    width: 14px;
    height: 14px;
}
.file-name-display {
    width: 100%;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}
.file-name-display.has-file {
    color: #333;
    border-color: var(--primary-color);
    background: #fff8f3;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
    outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.2);
}
button {
    background-color: var(--primary-color); color: white; border: none; padding: 14px 20px;
    border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: 600; width: 100%;
    transition: background-color 0.3s, transform 0.1s; display: flex; justify-content: center; align-items: center; gap: 10px;
}
button:hover { background-color: var(--primary-hover); }
button:active { transform: scale(0.98); }
.toggle-group { display: flex; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.toggle-group label {
    flex: 1; text-align: center; padding: 10px; margin: 0; cursor: pointer; background-color: #fff;
    transition: background-color 0.2s, color 0.2s; border-right: 1px solid var(--border-color);
}
.toggle-group label:last-child { border-right: none; }
.toggle-group input[type="radio"] { display: none; }
.toggle-group input[type="radio"]:checked + label { background-color: var(--primary-color); color: white; font-weight: bold; }
.result, .error { margin-top: 20px; padding: 15px; border-radius: 8px; text-align: center; }
.result { background-color: var(--success-bg); border: 1px solid var(--success-border); }
.result-code-wrapper {
    display: flex; align-items: center; justify-content: center; gap: 15px; background: #fff;
    padding: 10px 20px; border-radius: 8px; margin-top: 10px; border: 1px solid var(--border-color);
}
.result-code { font-size: 2rem; font-weight: bold; color: var(--primary-color); letter-spacing: 4px; }

/* Download Progress Bar */
.download-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.download-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.download-progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Upload Progress Bar */
.upload-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.upload-progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Upload Success Modal */
.upload-success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
.upload-success-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
    border: 3px solid #27ae60;
}
.upload-success-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.upload-success-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}
.upload-success-modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: #27ae60;
    margin: 0 0 15px 0;
}
.upload-success-message {
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 10px 0;
}
.upload-success-subtitle {
    font-size: 1rem;
    color: #666;
    margin: 20px 0 10px 0;
    font-weight: 600;
}
.upload-code-display {
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 800;
    background: #f8f9fa;
    padding: 20px 30px;
    border-radius: 12px;
    margin: 20px 0;
    border: 3px solid #27ae60;
    letter-spacing: 6px;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
    word-break: break-all;
}
.upload-code-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}
.upload-copy-code-btn {
    padding: 14px 30px;
    cursor: pointer;
    border: 2px solid #27ae60;
    background: #fff;
    color: #27ae60;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.upload-copy-code-btn:hover {
    background: #27ae60;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}
.upload-copy-message {
    font-size: 0.9rem;
    color: #27ae60;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.upload-copy-message.show {
    opacity: 1;
}
.upload-expiration-info {
    margin: 20px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 4px solid #ff8c42;
    border-radius: 8px;
}
.upload-expiration-text {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    font-weight: 500;
}
.upload-success-tip {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}
.upload-success-tip p {
    color: #fff;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
#copyBtn { background: none; border: none; cursor: pointer; padding: 5px; }
#copyBtn svg { width: 24px; height: 24px; color: #555; transition: color 0.2s; }
#copyBtn:hover svg { color: var(--primary-color); }
.copy-message {
    font-size: 0.85rem; color: var(--primary-color); font-weight: 500;
    opacity: 0; transition: opacity 0.3s ease-in-out; white-space: nowrap;
}
.copy-message.show { opacity: 1; }
.error { background-color: var(--error-bg); border: 1px solid var(--error-border); color: #c0392b; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Conference Success Modal */
.conference-success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
.conference-success-modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.4s ease;
    border: 2px solid var(--primary-color);
}
.conference-success-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.conference-success-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}
.conference-success-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 20px 0;
}
.conference-code-section {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.conference-code-label {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 10px 0;
    font-weight: 600;
}
.conference-code-display {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 10px 0;
    border: 2px solid var(--primary-color);
    letter-spacing: 4px;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.15);
    word-break: break-all;
}
.conference-code-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0 0;
}
.conference-copy-code-btn {
    padding: 10px 20px;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    background: #fff;
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    max-width: 200px;
}
.conference-copy-code-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}
.conference-copy-message {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.conference-copy-message.show {
    opacity: 1;
}

/* Header Navigation */
.header-nav {
    display: flex; gap: 15px; align-items: center;
}
.nav-link {
    text-decoration: none; color: var(--primary-color); font-weight: 600;
    font-size: 1rem; padding: 8px 16px; border-radius: 8px;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 5px;
}
.nav-link:hover {
    background: rgba(255, 140, 66, 0.1);
    color: var(--primary-hover);
}
.nav-button {
    background: none;
    border: none;
    text-decoration: none; 
    color: var(--primary-color); 
    font-weight: 600;
    font-size: 1rem; 
    padding: 8px 16px; 
    border-radius: 8px;
    transition: all 0.2s; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px;
    cursor: pointer;
    font-family: var(--font-family);
}
.nav-button:hover {
    background: rgba(255, 140, 66, 0.1);
    color: var(--primary-hover);
}
.pricing-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: #fff !important;
}
.pricing-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}

/* Credit System Styles */
.credit-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    color: #333; font-size: 0.7rem; font-weight: 700; padding: 2px 8px;
    border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.credit-cost {
    background: rgba(255, 215, 0, 0.2); color: var(--primary-color);
    font-size: 0.75rem; font-weight: 700; padding: 2px 6px;
    border-radius: 3px; margin-left: 4px;
}
.premium-toggle-group {
    margin-top: 6px;
}
.silver-badge {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 50%, #d4d4d4 100%);
    color: #333; font-size: 0.7rem; font-weight: 700; padding: 2px 8px;
    border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.premium-option {
    position: relative; display: flex; align-items: center; gap: 8px;
}
.premium-option.locked { opacity: 0.6; }
.premium-option .lock-icon {
    width: 14px; height: 14px; color: #888;
}
.premium-option.unlocked .lock-icon { display: none; }
.credit-input-wrapper {
    margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-color);
}
.credit-input-wrapper label {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.credit-input-wrapper input {
    font-size: 0.85rem; padding: 8px 10px; text-transform: uppercase;
    letter-spacing: 1px; font-family: 'Courier New', monospace;
}
.credit-status {
    font-size: 0.75rem; margin-top: 5px; display: flex; align-items: center; gap: 5px;
}
.credit-status.valid { color: #27ae60; }
.credit-status.invalid { color: #c0392b; }
.credit-status.checking { color: #7f8c8d; }
.credit-balance-info {
    margin-top: 10px; padding: 10px; background: #fff8f3; border-radius: 6px;
    border: 1px solid #ffe0c2;
}
.credit-balance-display {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 1.1rem; font-weight: 700; color: var(--primary-color);
}
.credit-balance-label { font-size: 0.9rem; color: #666; font-weight: 600; }
.credit-balance-value { font-size: 1.5rem; }
.credit-balance-unit { font-size: 0.9rem; color: #666; font-weight: 600; }
.credit-plan-info {
    text-align: center; margin-top: 6px; color: #888; font-size: 0.75rem;
}
.subscription-input-wrapper {
    margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--border-color);
}
.subscription-input-wrapper label {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.subscription-input-wrapper input {
    font-size: 0.85rem; padding: 8px 10px; text-transform: uppercase;
    letter-spacing: 1px; font-family: 'Courier New', monospace;
}
.subscription-status {
    font-size: 0.75rem; margin-top: 5px; display: flex; align-items: center; gap: 5px;
}
.subscription-status.valid { color: #27ae60; }
.subscription-status.invalid { color: #c0392b; }
.subscription-status.checking { color: #7f8c8d; }
.storage-info {
    margin-top: 10px; padding: 8px; background: #f8f9fa; border-radius: 6px;
}
.storage-bar {
    height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden;
}
.storage-bar-fill {
    height: 100%; background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 4px; transition: width 0.3s ease;
}
.storage-bar-fill.warning { background: linear-gradient(90deg, #f39c12, #e67e22); }
.storage-bar-fill.danger { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.storage-text {
    font-size: 0.7rem; color: #666; margin-top: 4px; text-align: center;
}
.buy-credits-btn {
    display: block; text-align: center;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333; font-size: 0.8rem; padding: 8px 12px; margin-top: 10px;
    border: none; border-radius: 6px; cursor: pointer; font-weight: 700;
    width: 100%; transition: all 0.2s; text-decoration: none;
}
.buy-credits-btn:hover { 
    background: linear-gradient(135deg, #ffe44d 0%, #ffd700 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}
.disconnect-credits-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff; font-size: 0.8rem; padding: 8px 12px; margin-top: 10px;
    border: none; border-radius: 6px; cursor: pointer; font-weight: 600;
    width: 100%; transition: all 0.2s;
}
.disconnect-credits-btn:hover {
    background: linear-gradient(135deg, #ec7063 0%, #e74c3c 100%);
    transform: translateY(-1px);
}
.get-silver-btn {
    background: linear-gradient(135deg, #c0c0c0 0%, #8a8a8a 100%);
    color: #333; font-size: 0.8rem; padding: 8px 12px; margin-top: 10px;
    border: none; border-radius: 6px; cursor: pointer; font-weight: 600;
    width: 100%; transition: all 0.2s;
}
.get-silver-btn:hover { 
    background: linear-gradient(135deg, #d4d4d4 0%, #a0a0a0 100%);
    transform: translateY(-1px);
}
.get-silver-btn.disconnect-mode {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
}
.get-silver-btn.disconnect-mode:hover {
    background: linear-gradient(135deg, #ec7063 0%, #e74c3c 100%) !important;
}
.my-files-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff; font-size: 0.8rem; padding: 8px 12px; margin-top: 8px;
    border: none; border-radius: 6px; cursor: pointer; font-weight: 600;
    width: 100%; transition: all 0.2s;
}
.my-files-btn:hover {
    background: linear-gradient(135deg, #5dade2 0%, #3498db 100%);
    transform: translateY(-1px);
}
.files-list {
    max-height: 400px; overflow-y: auto; margin-top: 15px;
}
.file-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px; border: 1px solid var(--border-color); border-radius: 8px;
    margin-bottom: 8px; background: #fff; transition: all 0.2s;
}
.file-item:hover { background: #f8f9fa; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; color: #333; word-break: break-word; }
.file-meta { font-size: 0.75rem; color: #888; margin-top: 4px; }
.file-code {
    font-family: 'Courier New', monospace; font-weight: 700;
    color: var(--primary-color); font-size: 1.1rem; margin-left: 15px;
    background: #fff3e6; padding: 5px 10px; border-radius: 4px;
}
.file-actions { display: flex; gap: 8px; margin-left: 10px; }
.file-actions button {
    padding: 6px 10px; font-size: 0.75rem; width: auto;
}
.no-files { text-align: center; color: #888; padding: 30px; }
.files-loading { text-align: center; padding: 30px; }

/* Modal Styles */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 1000; justify-content: center; align-items: center;
    backdrop-filter: blur(3px);
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff; border-radius: 16px; max-width: 420px; width: 90%;
    padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.modal-header h3 {
    margin: 0; font-size: 1.3rem; display: flex; align-items: center; gap: 10px;
}
.modal-close {
    background: none; border: none; font-size: 1.5rem; cursor: pointer;
    color: #888; padding: 0; line-height: 1;
}
.modal-close:hover { color: #333; }
.modal-body { margin-bottom: 25px; }
.modal-body ul {
    margin: 15px 0; padding-left: 20px;
}
.modal-body li {
    margin-bottom: 8px; color: #555;
}
.modal-body li strong { color: #333; }
.price-tag {
    font-size: 2rem; font-weight: 700; color: var(--primary-color);
    text-align: center; margin: 20px 0;
}
.price-tag span { font-size: 1rem; color: #888; font-weight: 400; }
#paypal-button-container { min-height: 45px; }
.payment-secure {
    text-align: center; font-size: 0.75rem; color: #888; margin-top: 15px;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}
.success-message {
    background: var(--success-bg); border: 1px solid var(--success-border);
    padding: 20px; border-radius: 10px; text-align: center;
}
.success-message h4 { color: #27ae60; margin: 0 0 10px 0; }
.subscription-code-display {
    font-family: 'Courier New', monospace; font-size: 1.2rem; font-weight: 700;
    background: #fff; padding: 12px 20px; border-radius: 8px; margin: 15px 0;
    border: 2px solid var(--success-border); letter-spacing: 2px;
}

.tab-container { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.tab {
    padding: 10px 20px; cursor: pointer; background: transparent; border: none; font-size: 1rem;
    border-bottom: 3px solid transparent; margin-bottom: -1px; color: #6e6e73;
}
.tab.active { border-bottom-color: var(--primary-color); color: var(--text-color); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }
#char-counter { font-size: 0.8rem; color: #6e6e73; text-align: right; margin-top: 5px; }
.content-wrapper {
    display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-bottom: 25px;
}
.content-wrapper > .tab-content { flex: 1; min-width: 250px; }
.content-wrapper > .upload-action-area { flex: 1; min-width: 250px; order: 3; margin-top: 0; }
.content-wrapper > .fieldset { flex: 0 0 280px; margin-bottom: 0; }
.fieldset { border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; background-color: #fafafa; }
.fieldset .legend { margin-bottom: 15px; font-size: 0.95rem; }
.fieldset .form-group { margin-bottom: 20px; }
.fieldset .form-group:last-child { margin-bottom: 0; }

/* Footer FAQ link */
footer.site-footer { margin-top: 20px; padding: 15px 20px; text-align: center; width: 100%; }
footer.site-footer a { color: #666; text-decoration: none; font-size: 0.8rem; transition: color 0.2s; margin: 0 5px; }
footer.site-footer a:hover { color: var(--primary-color); }

/* On laptop/desktop, keep FAQ link visible without adding any page height (prevents extra scroll) */
@media (min-width: 769px) {
    /* Hide mobile elements on desktop */
    .logo-mobile {
        display: none !important;
    }
    .logo-desktop {
        display: block !important;
    }
    .hamburger-menu-btn {
        display: none !important;
    }
    .mobile-menu {
        display: none !important;
    }
    .mobile-menu-overlay {
        display: none !important;
    }
    header {
        border-bottom: none !important;
    }
    .header-nav {
        display: flex !important;
    }
    /* Ensure upload button doesn't take full width on desktop */
    .upload-action-area #uploadButton {
        width: auto !important;
        max-width: none !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    footer.site-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 10px;
        margin: 0;
        padding: 0;
        pointer-events: none;
        z-index: 1001;
    }
    footer.site-footer a {
        pointer-events: auto;
        display: inline-block;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.75);
        border: 1px solid var(--border-color);
        border-radius: 999px;
        backdrop-filter: blur(6px);
    }
}

/* Laptop/Small Desktop - Reduce size by ~40% */
@media (min-width: 769px) and (max-width: 1400px) {
    body { padding: 12px; }
    header { margin-bottom: 18px; gap: 12px; }
    header img { max-width: 95px; }
    header h1 { font-size: 1.5rem; }
    header p { font-size: 0.7rem; }
    .container { gap: 18px; max-width: 1000px; }
    .card { 
        padding: 18px; 
        min-width: 200px;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    }
    h2 { 
        font-size: 1rem; 
        padding-bottom: 10px; 
        margin-bottom: 15px;
    }
    .form-group { margin-bottom: 15px; }
    label, .legend { 
        margin-bottom: 6px; 
        font-size: 0.75rem;
    }
    input[type="file"], input[type="text"], input[type="password"], input[type="date"], textarea {
        padding: 8px;
        border-radius: 6px;
        font-size: 0.85rem;
    }
    textarea { min-height: 80px; }
    button {
        padding: 10px 14px;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    .tab {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    .tab-container { margin-bottom: 12px; }
    #char-counter { font-size: 0.7rem; margin-top: 3px; }
    .content-wrapper { gap: 12px; margin-bottom: 15px; }
    .content-wrapper > .upload-action-area { 
        flex: 1; 
        min-width: 200px; 
    }
    .fieldset { 
        padding: 10px; 
        border-radius: 6px;
        flex: 0 0 200px;
    }
    .fieldset .legend { 
        margin-bottom: 10px; 
        font-size: 0.8rem;
    }
    .fieldset .form-group { margin-bottom: 12px; }
    .toggle-group label {
        padding: 6px;
        font-size: 0.75rem;
    }
    .result, .error { 
        margin-top: 12px; 
        padding: 10px;
        border-radius: 6px;
        font-size: 0.85rem;
    }
    .result-code-wrapper {
        padding: 6px 12px;
        margin-top: 6px;
        border-radius: 6px;
    }
    .result-code { 
        font-size: 1.3rem; 
        letter-spacing: 2px;
    }
    /* Download Progress Bar - Mobile */
    #downloadProgressContainer {
        margin-top: 12px;
        padding: 0 5px;
    }
    .download-progress-bar {
        height: 10px;
        margin-bottom: 10px;
    }
    .download-progress-text {
        font-size: 0.85rem;
        font-weight: 700;
    }
    /* Upload Progress Bar - Mobile */
    #uploadProgressContainer {
        margin-top: 12px;
        padding: 0 5px;
    }
    .upload-progress-bar {
        height: 10px;
        margin-bottom: 10px;
    }
    .upload-progress-text {
        font-size: 0.85rem;
        font-weight: 700;
    }
    #copyBtn svg { width: 18px; height: 18px; }
    .copy-message { font-size: 0.7rem; }
    .silver-badge {
        font-size: 0.6rem;
        padding: 1px 6px;
        border-radius: 3px;
    }
    .subscription-input-wrapper {
        margin-top: 10px;
        padding-top: 10px;
    }
    .subscription-input-wrapper input {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    .subscription-status { font-size: 0.65rem; margin-top: 3px; }
    .storage-info {
        margin-top: 8px;
        padding: 6px;
        border-radius: 4px;
    }
    .storage-bar { height: 6px; }
    .storage-text { font-size: 0.6rem; margin-top: 3px; }
    .buy-credits-btn, .disconnect-credits-btn, .get-silver-btn, .my-files-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
        margin-top: 8px;
        border-radius: 5px;
    }
    .credit-badge, .credit-cost {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
    .credit-balance-display { font-size: 0.9rem; }
    .credit-balance-value { font-size: 1.2rem; }
    .credit-balance-label, .credit-balance-unit { font-size: 0.75rem; }
    .header-nav { gap: 10px; }
    .nav-link { font-size: 0.85rem; padding: 6px 12px; }
    .premium-option .lock-icon {
        width: 12px;
        height: 12px;
    }
    .file-input-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    .file-input-btn svg {
        width: 14px;
        height: 14px;
    }
    .file-name-display {
        padding: 8px 10px;
        font-size: 0.75rem;
        border-radius: 6px;
    }
    .file-input-wrapper {
        gap: 8px;
    }
    .disconnect-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    .disconnect-modal-title {
        font-size: 1.4rem;
    }
    .disconnect-modal-icon {
        font-size: 3rem;
    }
    .disconnect-modal-message {
        font-size: 1rem;
    }
    .disconnect-modal-info {
        padding: 15px;
    }
    .disconnect-modal-info p {
        font-size: 0.85rem;
    }
    .disconnect-modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .disconnect-modal-cancel-btn,
    .disconnect-modal-confirm-btn {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        width: 100%;
    }
    .container {
        width: 100%;
        max-width: 100%;
        gap: 15px;
        flex-direction: column;
    }
    .card {
        min-width: 0;
        width: 100%;
        padding: 20px 15px;
    }
    .content-wrapper { flex-direction: column; gap: 10px; }
    .content-wrapper > .tab-content {
        min-width: 0;
        width: 100%;
    }
    .content-wrapper > .fieldset { 
        flex: 1; 
        width: 100%; 
        min-width: 0;
        margin: 0;
    }
    .content-wrapper > .upload-action-area {
        order: 2;
        margin-top: 10px;
        width: 100%;
        flex-basis: 100%;
    }
    .content-wrapper > .fieldset {
        order: 3;
    }
    .toggle-group {
        flex-wrap: wrap;
    }
    .toggle-group label {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    .result-code-wrapper {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    .result-code {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    header {
        justify-content: space-between;
        margin-bottom: 20px;
        width: 100%;
        padding: 0 15px 15px 15px;
        flex-direction: row;
        align-items: center;
        position: relative;
        border-bottom: 2px dashed rgba(255, 140, 66, 0.5);
    }
    .header-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        min-width: 0;
    }
    .hamburger-menu-btn {
        display: flex;
        align-self: center;
        z-index: 10002;
    }
    .header-nav {
        display: none;
    }
    .mobile-menu {
        display: block;
    }
    .mobile-menu-overlay {
        display: block;
    }
    .logo-desktop {
        display: none;
    }
    .logo-mobile {
        display: block;
        max-width: 80px;
        width: 80px;
        height: auto;
        margin-left: 0;
        margin-right: 0;
        flex-shrink: 0;
    }
    header {
        align-items: flex-start;
    }
    .header-right {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        justify-content: center;
        flex-direction: column;
    }
    .header-credit-status-wrapper {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-bottom: 15px;
        padding: 8px 10px;
        gap: 8px;
        flex-wrap: nowrap;
        overflow: hidden;
    }
    /* When premium license is active, allow wrapping to two rows */
    .header-credit-status-wrapper:has(.header-status-value.premium) {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .header-credit-status-wrapper:has(.header-status-value.premium) .header-credit-status-display {
        flex-basis: auto;
        width: auto;
    }
    .header-credit-status-wrapper:has(.header-status-value.premium) .header-credit-balance-display {
        flex-basis: auto;
        width: auto;
    }
    .header-credit-status-wrapper:has(.header-status-value.premium) .header-credit-actions {
        flex-basis: 100%;
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .header-credit-status-display,
    .header-credit-balance-display {
        flex-shrink: 1;
        min-width: 0;
        white-space: nowrap;
    }
    .header-status-label {
        font-size: 0.7rem;
    }
    .header-status-value {
        font-size: 0.8rem;
        padding: 2px 8px;
    }
    .header-credit-balance-display {
        font-size: 0.75rem;
    }
    .header-balance-value {
        font-size: 0.9rem;
    }
    .header-balance-label, .header-balance-unit {
        font-size: 0.7rem;
    }
    .header-credit-actions {
        flex-wrap: nowrap;
        gap: 6px;
        flex-shrink: 0;
        margin-left: auto;
    }
    .header-credit-code-btn, .header-disconnect-credits-btn, .header-active-links-btn {
        font-size: 0.65rem;
        padding: 6px 8px;
        flex-shrink: 1;
        min-width: 0;
        white-space: nowrap;
        width: auto;
    }
    .credit-modal-content {
        padding: 20px;
        max-width: 95%;
    }
    .credit-modal-title {
        font-size: 1.2rem;
    }
    .credit-modal-input {
        font-size: 0.9rem;
        padding: 10px 14px;
    }
    .upload-success-modal-content,
    .conference-success-modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }
    .upload-success-modal-title,
    .conference-success-modal-title {
        font-size: 1.5rem;
    }
    .upload-code-display,
    .conference-code-display {
        font-size: 1.5rem;
        padding: 15px 20px;
        letter-spacing: 4px;
    }
    .conference-success-modal-content {
        padding: 20px 15px;
        max-width: 95%;
    }
    .conference-success-modal-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    .conference-code-section {
        padding: 12px;
        margin: 12px 0;
    }
    .conference-code-label {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    .conference-code-display {
        font-size: 1.4rem;
        padding: 12px 15px;
        letter-spacing: 3px;
    }
    .conference-copy-code-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        max-width: 100%;
    }
    .upload-copy-code-btn {
        font-size: 0.9rem;
        padding: 12px 24px;
    }
    .active-links-modal-content {
        padding: 20px;
        max-width: 95%;
    }
    .active-links-modal-title {
        font-size: 1.4rem;
    }
    .active-link-code {
        font-size: 1rem;
    }
    .active-link-name {
        font-size: 0.85rem;
    }
    .active-link-expires {
        font-size: 0.8rem;
    }
    .premium-toggle-group {
        flex-wrap: wrap;
    }
    .premium-toggle-group label {
        font-size: 0.75rem;
        padding: 8px 6px;
    }
    .fieldset {
        padding: 12px;
        width: 100%;
        min-width: 0;
    }
    .disconnect-modal-content {
        padding: 25px 15px;
        max-width: 95%;
    }
    .disconnect-modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .disconnect-modal-cancel-btn,
    .disconnect-modal-confirm-btn {
        max-width: 100%;
        width: 100%;
    }
    footer.site-footer {
        padding: 15px 10px;
    }
    footer.site-footer a {
        font-size: 0.7rem;
        margin: 0 3px;
    }
    /* Increase upload button width on mobile without changing text size */
    .upload-action-area #uploadButton {
        padding-left: 40px;
        padding-right: 40px;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }
    /* Active Links mobile styles */
    .active-link-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .active-link-actions {
        width: 100%;
    }
    .active-link-download-btn,
    .active-link-delete-btn {
        flex: 1;
        min-width: 0;
    }
    /* Delete Link Modal mobile styles */
    .delete-link-modal-content {
        padding: 25px 15px;
        max-width: 95%;
    }
    .delete-link-modal-title {
        font-size: 1.4rem;
    }
    .delete-link-modal-icon {
        font-size: 3rem;
    }
    .delete-link-modal-message {
        font-size: 1rem;
    }
    .delete-link-modal-info {
        padding: 15px;
    }
    .delete-link-modal-info p {
        font-size: 0.85rem;
    }
    .delete-link-modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .delete-link-modal-cancel-btn,
    .delete-link-modal-confirm-btn {
        max-width: 100%;
        width: 100%;
    }
}

/* Direct download page (dl.html) */
.dl-header-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.dl-download-action {
    margin-top: 18px;
}
.dl-code-line {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-color);
}
.dl-invalid-text {
    line-height: 1.65;
    color: #555;
    margin: 0 0 12px;
}
.dl-invalid-text code {
    font-size: 0.9em;
    padding: 2px 6px;
    background: var(--secondary-color);
    border-radius: 4px;
}

.dl-invalid-hook {
    line-height: 1.6;
    color: #444;
    margin: 0 0 16px;
    font-size: 1rem;
}
.dl-invalid-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 8px;
}
.dl-invalid-back-link {
    display: inline-block;
}

.dl-marketing-panel {
    width: 100%;
    max-width: 100%;
}
.dl-marketing-card {
    margin-top: 0;
}
.dl-marketing-title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    color: var(--text-color);
    font-weight: 700;
}
.dl-marketing-lead {
    margin: 0 0 16px;
    line-height: 1.55;
    color: #555;
    font-size: 1rem;
}
.dl-marketing-benefits {
    margin: 0 0 20px;
    padding-left: 1.25rem;
    line-height: 1.65;
    color: var(--text-color);
    font-size: 0.95rem;
}
.dl-marketing-benefits li {
    margin-bottom: 8px;
}
.dl-marketing-benefits li:last-child {
    margin-bottom: 0;
}
.dl-marketing-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}
.dl-marketing-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.35);
}
.dl-marketing-btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 140, 66, 0.45);
}
.dl-marketing-btn-secondary {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    text-decoration: none;
}
.dl-marketing-btn-secondary:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

@media (min-width: 769px) and (max-width: 1400px) {
    .dl-marketing-title {
        font-size: 1.15rem;
    }
    .dl-marketing-lead,
    .dl-marketing-benefits {
        font-size: 0.88rem;
    }
    .dl-marketing-btn-primary {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    .dl-marketing-btn-secondary {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .dl-marketing-cta-row,
    .dl-invalid-cta {
        flex-direction: column;
        align-items: stretch;
    }
    .dl-marketing-btn-primary {
        text-align: center;
    }
    .dl-invalid-back-link {
        text-align: center;
    }
}

