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

body {
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: #0a0a0a;
    color: #e0e0e0;
    padding: 1rem;
}

.container {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #2a2a2a;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 0.875rem;
    color: #888;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #aaa;
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1rem;
    transition: border-color 0.2s;
    text-transform: uppercase;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4f8;
}

.input-wrapper input::placeholder {
    letter-spacing: normal;
    color: #555;
    font-family: system-ui;
}

.btn {
    padding: 0.75rem 1.5rem;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn:hover {
    background: #3a3a3a;
    border-color: #4a4a4a;
}

.btn.primary {
    background: #4f8;
    color: #000;
    border: none;
    font-weight: 600;
    width: 100%;
    margin-top: 0.5rem;
}

.btn.primary:hover {
    background: #5ff;
}

.btn.small {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

.display-area {
    margin-top: 2rem;
    padding: 2rem;
    background: #111;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #2a2a2a;
}

.display-area.hidden {
    display: none;
}

.code {
    font-size: 4.5rem;
    letter-spacing: 0.75rem;
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #4f8;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(68, 255, 136, 0.3);
}

.timer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.timer-text {
    font-size: 0.875rem;
    color: #888;
}

.timer-seconds {
    font-weight: bold;
    color: #fff;
    font-size: 1.1rem;
}

.timer-bar {
    width: 100%;
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}

.timer-bar-fill {
    height: 100%;
    background: #4f8;
    transition: width 1s linear;
    border-radius: 2px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.shortcut-link {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #0a0a0a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.shortcut-link span {
    font-size: 0.75rem;
    color: #666;
    word-break: break-all;
    flex: 1;
}

.btn-copy {
    padding: 0.25rem 0.75rem;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #3a3a3a;
}

.btn-copy.copied {
    background: #4f8;
    color: #000;
    border-color: #4f8;
}

.account-info {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #555;
    word-break: break-all;
}

.recent-list {
    margin-top: 1.5rem;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background: #111;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

.recent-item code {
    color: #4f8;
    font-family: 'Courier New', monospace;
}

.divider {
    text-align: center;
    margin: 1.5rem 0 1rem;
    position: relative;
    color: #555;
    font-size: 0.75rem;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #2a2a2a;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #f66;
    font-size: 0.875rem;
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

@media (max-width: 500px) {
    .container {
        padding: 1.5rem;
    }

    .code {
        font-size: 3rem;
        letter-spacing: 0.5rem;
    }
}