@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #eef2ff;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f97316;
    --text: #1e293b;
    --text-muted: #94a3b8;
    --text-light: #f8fafc;
    --border: #e2e8f0;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
}

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

body {
    position: relative;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.timerSettings {
    position: fixed;
    left: 0;
    top: 0;
    margin: 10px;
}

.burger-icon > span{
    border: 1px solid #fff;
    width: 20px
}

.title {
    font-size: 28px;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.05em;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    margin-bottom: 2px;
}

.subTitle {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.header {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(20px);
}

.topRow {
    display: flex;
    justify-content: center;
    gap: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.topCell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
}

.topCell:not(:last-child) {
    border-right: 1px solid var(--border);
}

.label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.items {
    display: flex;
    gap: 5px;
}

.item,
.alphabet-letter {
    width: 34px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--primary);
    font-weight: 700;
    font-size: 17px;
    text-transform: uppercase;
    background: var(--card-bg);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    user-select: none;
}

.item--date {
    margin-right: 8px;
}

.item.date {
    user-select: auto;
}

.item.date .item-input {
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}

.item-input {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 17px;
    background: transparent;
    text-transform: uppercase;
    font-family: inherit;
}

.item-input:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f8fafc;
    border-radius: var(--radius-xs);
}

.item-input:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    border-radius: 4px;
}

.middleRow {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label--middleCell {
    display: block;
    width: 150px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: none;
    letter-spacing: normal;
}

.middleCell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction {
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.instructions {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.5;
}

.alphabet {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.alphabet-letter {
    width: 26px;
    height: 28px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--card-bg);
    border-color: #e8e8e8;
}

.alphabet-letter:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.countdownTimer {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.separator {
    font-size: 6rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1;
    user-select: none;
}

.button {
    height: 44px;
    padding: 0 24px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.button:active {
    transform: scale(0.97);
}

.button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.timerToggle {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.timerToggle:hover:not(:disabled) {
    box-shadow: 0 6px 10px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.timerToggle:disabled {
    background: #d1d5db;
    box-shadow: none;
}

.timerReset {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.timerReset:hover {
    box-shadow: 0 6px 10px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.footer {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.footer__block {
    display: flex;
    gap: 32px;
}

.footer__block .topCell {
    padding: 0;
    border: none;
}

.footer__block .topCell:not(:last-child) {
    border-right: 1px solid var(--border);
    padding-right: 32px;
}

.footer__block .item {
    width: 28px;
    height: 32px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .container {
        padding: 12px 10px;
    }

    .title {
        font-size: 22px;
    }

    .subTitle {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .header {
        padding: 16px;
    }

    .topRow {
        gap: 12px;
    }

    .topCell {
        padding: 0 16px;
    }

    .label--middleCell {
        width: 120px;
    }

    .separator {
        font-size: 4rem;
    }

    .countdownTimer {
        padding: 20px;
        gap: 12px;
    }

    .footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer__block {
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 18px;
    }

    .subTitle {
        font-size: 13px;
    }

    .topRow {
        flex-direction: column;
        align-items: center;
    }

    .topCell {
        padding: 0;
    }

    .topCell:not(:last-child) {
        border-right: none;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border);
    }

    .item,
    .alphabet-letter {
        width: 30px;
        height: 34px;
        font-size: 15px;
    }

    .item-input {
        font-size: 15px;
    }

    .label--middleCell {
        width: auto;
        min-width: 80px;
        font-size: 12px;
    }

    .instruction {
        padding: 12px;
    }

    .alphabet-letter {
        width: 24px;
        height: 26px;
        font-size: 11px;
    }

    .separator {
        font-size: 2.5rem;
    }

    .countdownTimer {
        padding: 16px;
        gap: 8px;
    }

    .button {
        font-size: 12px;
        padding: 0 16px;
        height: 38px;
    }

    .footer {
        font-size: 11px;
        padding: 12px 16px;
    }

    .footer__block .item {
        width: 24px;
        height: 28px;
        font-size: 12px;
    }
}

@media print {
    .countdownTimer {
        display: none !important;
    }

    .button {
        display: none !important;
    }

    .settings-overlay {
        display: none !important;
    }

    body {
        background: none;
        min-height: auto;
    }

    .container {
        padding: 0;
        min-height: auto;
    }

    .header,
    .footer {
        box-shadow: none;
        border: 1px solid #ccc;
        border-radius: 0;
    }

    .item-input {
        border: none;
        background: none;
        color: #000;
    }

    .item-input:disabled {
        opacity: 1;
        background: none;
    }

    .item,
    .alphabet-letter {
        border: 1px solid #999;
        color: #000;
    }

    .alphabet-letter {
        color: #999;
    }

    .main {
        min-height: auto;
        gap: 12px;
    }

    .instruction {
        background: #f9f9f9;
        border: 1px solid #eee;
    }

    .title {
        color: #000;
        text-shadow: none;
    }

    .subTitle {
        color: #555;
        text-shadow: none;
    }
}
