:root {
    --primary-color: #0b57d0;
    --primary-hover: #0842a0;
    --primary-light: #e8f0fe;
    --text-main: #1f1f1f;
    --text-secondary: #444746;
    --text-muted: #747775;
    --bg-main: #f0f4f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: #c7c7c7;
    --danger-color: #dc362e;
    --success-color: #146c2e;
    --border-radius-lg: 24px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(168,199,250,0.8) 0%, rgba(255,255,255,0) 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(232,240,254,1) 0%, rgba(255,255,255,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Header */
.top-nav {
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(240, 244, 249, 0.6);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.brand-link:hover {
    color: var(--primary-color);
}

.brand-icon {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
}

.icon-btn svg {
    width: 22px;
    height: 22px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
    width: 100%;
    max-width: 480px;
    padding: 48px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.glass-card:hover {
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.06), 0 8px 16px rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.shield-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
}

.shield-icon {
    width: 32px;
    height: 32px;
}

.title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Input Section */
.input-group {
    margin-bottom: 32px;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-left: 4px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: 'Inter', monospace;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-main);
    text-transform: uppercase;
    transition: var(--transition);
    outline: none;
    letter-spacing: 1px;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.input-wrapper input::placeholder {
    color: #a0a0a0;
    text-transform: none;
    letter-spacing: normal;
}

/* Result Section */
.result-section {
    margin-bottom: 32px;
}

.code-container {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    text-align: center;
    position: relative;
    margin-bottom: 20px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    cursor: pointer;
}

.code-container:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(11, 87, 208, 0.05);
}

.code-display {
    font-family: 'Outfit', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 6px;
    line-height: 1.2;
    transition: var(--transition);
    user-select: none;
}

.code-display.error {
    font-size: 1.25rem;
    letter-spacing: normal;
    color: var(--danger-color);
}

.copy-btn {
    position: absolute;
    bottom: -18px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(11, 87, 208, 0.3);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(10px);
}

.code-container:hover .copy-btn {
    opacity: 1;
    transform: translateY(0);
}

.copy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 87, 208, 0.4);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Progress */
.progress-container {
    text-align: center;
    padding: 0 10px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    width: 100%;
    transition: width 1s linear, background-color 0.3s ease;
}

.progress-bar.danger {
    background: var(--danger-color);
}

.time-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.time-value {
    font-weight: 600;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.time-value.danger {
    color: var(--danger-color);
}

/* Info Alert */
.info-alert {
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.alert-icon {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-icon svg {
    width: 20px;
    height: 20px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-hover);
    margin-bottom: 6px;
}

.alert-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* SEO Section */
.seo-section {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 0 24px;
    color: var(--text-secondary);
}

.seo-content {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-md);
    padding: 32px;
    font-size: 0.95rem;
    line-height: 1.7;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.02);
}

.seo-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 16px;
    font-weight: 700;
}

.seo-content p {
    margin-bottom: 16px;
}

.seo-content p:last-child {
    margin-bottom: 0;
}

.seo-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.seo-content a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .glass-card {
        padding: 32px 20px;
        border-radius: var(--border-radius-md);
        border: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    }
    
    .code-display {
        font-size: 2.8rem;
        letter-spacing: 4px;
    }
    
    .copy-btn {
        opacity: 1;
        transform: translateY(0);
        position: static;
        margin-top: 16px;
    }
    
    .code-container {
        padding-bottom: 16px;
        min-height: auto;
    }
}
