* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #e8f0fe;
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

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

.card {
    background: #f0f4fc;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 
        8px 8px 16px #d1d9e6,
        -8px -8px 16px #ffffff;
}

/* Header */
.header-card {
    text-align: center;
    background: #eef2fc;
    border-radius: 28px;
    box-shadow: 
        10px 10px 20px #cdd5e4,
        -10px -10px 20px #ffffff;
}

.main-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #4a47c7;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.creator-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 40%;
    border: 3px solid #ffffff;
    object-fit: cover;
    box-shadow: 
        3px 3px 6px #d1d9e6,
        -3px -3px 6px #ffffff;
}

.creator-text {
    font-size: 0.995rem;
    color: #7c3aed;
    font-weight: 600;
}

/* Tutorial Card */
.tutorial-card {
    text-decoration: none;
    color: #2d3748;
    background: #fff0f0;
    display: block;
    border-radius: 24px;
    box-shadow: 
        8px 8px 16px #dcc8c8,
        -8px -8px 16px #ffffff;
}

.tutorial-card:active {
    box-shadow: 
        inset 4px 4px 8px #dcc8c8,
        inset -4px -4px 8px #ffffff;
}

.tutorial-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutorial-content i {
    font-size: 1.5rem;
    color: #ef4444;
    filter: drop-shadow(2px 2px 3px rgba(239, 68, 68, 0.2));
}

.tutorial-content strong {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2px;
    color: #2d3748;
}

.tutorial-content p {
    font-size: 0.78rem;
    color: #64748b;
}

/* Guide Card */
.guide-title {
    font-size: 1rem;
    margin-bottom: 14px;
    color: #4a47c7;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8edf5;
    font-weight: 700;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
}

.step-number {
    background: #4a47c7;
    color: #ffffff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    box-shadow: 
        3px 3px 6px #3a3799,
        -2px -2px 6px #6b69e0,
        inset 2px 2px 4px rgba(255,255,255,0.2),
        inset -2px -2px 4px rgba(0,0,0,0.1);
}

.safe-badge {
    background: #dcfce7;
    color: #16a34a;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.73rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    box-shadow: 
        3px 3px 6px #b8d4be,
        -3px -3px 6px #ffffff;
}

.example-box {
    background: #eef2fc;
    padding: 12px;
    border-radius: 12px;
    border-left: 4px solid #4a47c7;
    margin: 4px 0;
    box-shadow: 
        inset 3px 3px 6px #dde3f0,
        inset -3px -3px 6px #ffffff;
}

.example-box strong {
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
}

.example-box code {
    display: block;
    margin-top: 4px;
    color: #7c3aed;
    word-break: break-all;
    font-size: 0.7rem;
    font-family: 'SF Mono', 'Courier New', monospace;
    font-weight: 500;
}

/* Platforms Card */
.platforms-card h3 {
    margin-bottom: 14px;
    color: #4a47c7;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 700;
}

.platforms-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #475569;
    padding: 12px 16px;
    border-radius: 16px;
    background: #eef2fc;
    transition: all 0.15s ease;
    min-width: 70px;
    box-shadow: 
        5px 5px 10px #d1d9e6,
        -5px -5px 10px #ffffff;
}

.platform-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.1));
}

.platform-btn:active {
    box-shadow: 
        inset 4px 4px 8px #d1d9e6,
        inset -4px -4px 8px #ffffff;
}

.platform-btn span {
    font-size: 0.68rem;
    font-weight: 600;
    color: #7c3aed;
}

/* Input Card */
.input-card h3 {
    margin-bottom: 14px;
    color: #4a47c7;
    font-size: 0.95rem;
    font-weight: 700;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.token-input {
    width: 100%;
    padding: 13px 14px;
    background: #eef2fc;
    border: none;
    border-radius: 14px;
    color: #2d3748;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 
        inset 4px 4px 8px #d1d9e6,
        inset -4px -4px 8px #ffffff;
    transition: all 0.2s ease;
}

.token-input:focus {
    outline: none;
    box-shadow: 
        inset 4px 4px 8px #d1d9e6,
        inset -4px -4px 8px #ffffff,
        0 0 0 3px rgba(122, 90, 248, 0.15);
}

.token-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.generate-btn {
    background: #4a47c7;
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 
        6px 6px 12px #3a3799,
        -3px -3px 8px #7c7af0;
}

.generate-btn:active {
    box-shadow: 
        inset 4px 4px 8px #3a3799,
        inset -4px -4px 8px #6b69e0;
    transform: scale(0.98);
}

.loading {
    text-align: center;
    margin: 12px 0;
    color: #7c3aed;
    font-size: 0.85rem;
    font-weight: 500;
}

.loading i {
    margin-right: 6px;
}

.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 12px;
    margin: 12px 0;
    border-left: 4px solid #dc2626;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 
        inset 3px 3px 6px #e8cccc,
        inset -3px -3px 6px #ffffff;
}

.result-box {
    margin: 12px 0;
    background: #eef2fc;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 
        inset 4px 4px 8px #d1d9e6,
        inset -4px -4px 8px #ffffff;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 0;
    border-bottom: 2px solid #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 700;
    color: #7c3aed;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    color: #2d3748;
    word-break: break-all;
    font-size: 0.78rem;
    font-weight: 500;
}

.copy-btn {
    width: 100%;
    margin-top: 12px;
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 
        5px 5px 10px #0d9668,
        -3px -3px 8px #34d399;
}

.copy-btn:active {
    box-shadow: 
        inset 4px 4px 8px #0d9668,
        inset -4px -4px 8px #34d399;
    transform: scale(0.98);
}

/* Footer */
.footer-card {
    text-align: center;
    background: #eef2fc;
    border-radius: 24px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #475569;
    padding: 9px 14px;
    border-radius: 14px;
    background: #e8edf5;
    transition: all 0.15s ease;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: 
        4px 4px 8px #d1d9e6,
        -4px -4px 8px #ffffff;
}

.social-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.social-btn i {
    font-size: 0.9rem;
    color: #7c3aed;
}

.social-btn:active {
    box-shadow: 
        inset 3px 3px 6px #d1d9e6,
        inset -3px -3px 6px #ffffff;
}

.footer-info {
    margin: 12px 0;
}

.footer-text {
    font-size: 0.65rem;
    color: #94a3b8;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 3px 0;
}

.terms-btn {
    background: #e8edf5;
    color: #7c3aed;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.73rem;
    font-weight: 700;
    box-shadow: 
        4px 4px 8px #d1d9e6,
        -4px -4px 8px #ffffff;
}

.terms-btn:active {
    box-shadow: 
        inset 3px 3px 6px #d1d9e6,
        inset -3px -3px 6px #ffffff;
    color: #4a47c7;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #eef2fc;
    border-radius: 28px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    box-shadow: 
        12px 12px 24px #c8d0e0,
        -12px -12px 24px #ffffff;
}

.modal-content h2 {
    color: #4a47c7;
    margin-bottom: 14px;
    font-size: 1.2rem;
    font-weight: 700;
}

.terms-text {
    margin: 10px 0;
}

.terms-official {
    margin: 10px 0;
    color: #475569;
    font-style: italic;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.8rem;
    line-height: 1.6;
    font-weight: 500;
}

.terms-safe {
    margin: 10px 0;
    color: #16a34a;
    font-style: italic;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.6;
}

.terms-warning {
    margin: 10px 0;
    color: #dc2626;
    font-style: italic;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.6;
}

.accept-btn {
    width: 100%;
    background: #4a47c7;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 10px;
    box-shadow: 
        6px 6px 12px #3a3799,
        -3px -3px 8px #7c7af0;
}

.accept-btn:active {
    box-shadow: 
        inset 4px 4px 8px #3a3799,
        inset -4px -4px 8px #6b69e0;
    transform: scale(0.98);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 280px;
    max-width: 400px;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.4s ease, fadeOut 0.3s ease 2.7s forwards;
    box-shadow: 
        6px 6px 12px #c8d0e0,
        -4px -4px 8px #ffffff;
}

.toast-success {
    background: #dcfce7;
    color: #16a34a;
    border-left: 4px solid #16a34a;
}

.toast-error {
    background: #fee2e2;
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.toast-warning {
    background: #fef3c7;
    color: #d97706;
    border-left: 4px solid #d97706;
}

.toast-info {
    background: #dbeafe;
    color: #2563eb;
    border-left: 4px solid #2563eb;
}

.toast i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Countdown Timer */
.countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2fc;
    padding: 8px 14px;
    border-radius: 12px;
    margin-top: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a47c7;
    box-shadow: 
        inset 3px 3px 6px #d1d9e6,
        inset -3px -3px 6px #ffffff;
}

.countdown-timer i {
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

.countdown-timer.warning {
    color: #dc2626;
    background: #fee2e2;
    box-shadow: 
        inset 3px 3px 6px #e8cccc,
        inset -3px -3px 6px #ffffff;
}

/* JWT Copy Button */
.jwt-copy-btn {
    background: #f59e0b;
    box-shadow: 
        5px 5px 10px #d97706,
        -3px -3px 8px #fbbf24;
}

.jwt-copy-btn:active {
    box-shadow: 
        inset 4px 4px 8px #d97706,
        inset -4px -4px 8px #fbbf24;
    transform: scale(0.98);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mobile optimized */
@media (max-width: 380px) {
    .container {
        padding: 12px 10px;
    }
    
    .card {
        padding: 16px;
        border-radius: 20px;
    }
    
    .main-title {
        font-size: 1.4rem;
    }
    
    .platform-btn {
        min-width: 60px;
        padding: 10px 12px;
    }
    
    .platform-icon {
        width: 28px;
        height: 28px;
    }
}