/* CSS Variables for easy customization */
:root {
    --primary-color: #2ecc71;
    --primary-hover: #27ae60;
    --background-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #ffffff;
    --text-secondary: #b8b8b8;
    --error-color: #e74c3c;
    --progress-bg: #404040;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Light theme variant (uncomment to use light theme) */
/*
:root {
    --primary-color: #27ae60;
    --primary-hover: #229954;
    --background-color: #f5f5f5;
    --container-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --error-color: #c0392b;
    --progress-bg: #e0e0e0;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#container {
    width: 100%;
    max-width: 600px;
    background-color: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
}

@media (max-width: 768px) {
    #container {
        padding: 30px 20px;
    }
}

#content {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Initial State */
#introduction-message {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-secondary);
    text-align: center;
}

#get-key-button {
    width: 100%;
    padding: 18px 40px;
    font-size: 20px;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

#get-key-button:hover {
    background-color: var(--primary-hover);
}

#get-key-button:active {
    transform: scale(0.98);
}

#get-key-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Processing State */
#processing-state {
    text-align: center;
}

#preparing-message {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

#timer-display {
    margin-bottom: 30px;
}

#time-text {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
    #time-text {
        font-size: 36px;
    }
}

#progress-bar-container {
    width: 100%;
    height: 30px;
    background-color: var(--progress-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: var(--border-radius);
}

#timer-note {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

#timer-note a {
    color: var(--primary-color);
    text-decoration: none;
}

#timer-note a:hover {
    text-decoration: underline;
}

/* Keys Display State */
#keys-state {
    text-align: center;
}

#keys-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

#keys-container {
    text-align: left;
}

.key-item {
    background-color: var(--progress-bg);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.key-item:last-child {
    margin-bottom: 0;
}

.key-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.key-value {
    font-size: 16px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    word-break: break-all;
    background-color: var(--background-color);
    padding: 10px;
    border-radius: 4px;
}

/* Error State */
#error-state {
    text-align: center;
}

#error-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--error-color);
}

#error-message {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.6;
}

#contact-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

#contact-message a {
    color: var(--primary-color);
    text-decoration: none;
}

#contact-message a:hover {
    text-decoration: underline;
}
