* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 35px;
    font-size: 0.95em;
    font-weight: 400;
}

.input-group {
    margin-bottom: 15px;
}

#secretKeys {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    resize: vertical;
    min-height: 140px;
    line-height: 1.8;
    background: #fafbfc;
    letter-spacing: 0.5px;
}

#secretKeys:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
}

#secretKeys::placeholder {
    text-transform: none;
    color: #999;
    letter-spacing: 0;
    line-height: 1.6;
}

.btn-generate {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-bottom: 30px;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-generate:active {
    transform: translateY(0);
}

.results {
    margin-bottom: 30px;
}

.global-timer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
}

.global-timer .time-remaining {
    color: white;
    font-size: 1.6em;
    font-weight: 700;
    margin-top: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.result-item {
    background: white;
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 26px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
}

.result-item:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.18);
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.2);
}

.result-item.error {
    background: #fff5f5;
    border-color: #ffcdd2;
}

.result-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15em;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.result-content {
    flex: 1;
    min-width: 0;
}

.code-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.code {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 8px;
    font-family: 'Courier New', 'Consolas', monospace;
    line-height: 1.2;
}

.copy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.copy-btn:active {
    transform: translateY(0);
}

.error-message {
    font-size: 1.1em;
    color: #d32f2f;
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 20px;
    transition: width 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.secret-info {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 10px;
    word-break: break-all;
    font-size: 0.82em;
    color: #6c757d;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    letter-spacing: 0.3px;
    border: 1px solid #e9ecef;
}

.info-box {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 10px;
}

.info-box h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.info-box ul {
    list-style-position: inside;
    color: #555;
    line-height: 1.8;
}

.info-box li {
    margin-bottom: 8px;
}
/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 2em;
    }

    .code {
        font-size: 1.8em;
        letter-spacing: 4px;
    }

    .code-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
    }

    .result-item {
        padding: 20px;
        gap: 16px;
    }

    .result-number {
        width: 44px;
        height: 44px;
        font-size: 1em;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result {
    animation: fadeIn 0.5s ease;
}
