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

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #1a8f5c 0%, #0d6b45 100%);
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(26, 143, 92, 0.3);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 143, 92, 0.4);
}

.theme-icon {
    font-size: 1.2em;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a8f5c 0%, #0d6b45 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    width: 100%;
    min-height: 900px;
    height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    overflow-y: auto;
    margin-bottom: 150px;
}

.site-header {
    text-align: center;
    padding: 15px 20px;
    font-size: 3.5em;
    font-weight: 900;
    background: linear-gradient(135deg, #1a8f5c 0%, #0d6b45 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    animation: headerPulse 3s ease-in-out infinite;
    margin-bottom: 50px;
}

@keyframes headerPulse {
    0%, 100% {
        filter: drop-shadow(0 2px 8px rgba(26, 143, 92, 0.3));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 4px 20px rgba(26, 143, 92, 0.5));
        transform: scale(1.02);
    }
}

.question-mark {
    display: inline-block;
    font-size: 1.4em;
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: questionBounce 2s ease-in-out infinite;
    margin-left: 2px;
}

@keyframes questionBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(5deg);
    }
    75% {
        transform: translateY(-3px) rotate(-3deg);
    }
}

#form-view {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2 {
    color: #555;
    margin-bottom: 30px;
    font-size: 2em;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a8f5c 0%, #0d6b45 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.step-indicator {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1em;
}

#retirement-form {
    width: 100%;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-step h3 {
    text-align: center;
    color: #333;
    font-size: 1.8em;
    margin-bottom: 25px;
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 20px;
    border: 3px solid #ddd;
    border-radius: 15px;
    font-size: 1.4em;
    margin-bottom: 25px;
    transition: border-color 0.3s, box-shadow 0.3s;
    text-align: center;
    caret-color: transparent;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #1a8f5c;
    box-shadow: 0 0 0 4px rgba(26, 143, 92, 0.2);
    caret-color: transparent;
}

.other-input {
    max-width: 500px;
    margin: 20px auto;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.input-group input {
    width: 100px;
    margin-bottom: 0;
}

.input-group span {
    color: #666;
    font-size: 1.2em;
}

.break-input {
    gap: 40px;
}

.break-field {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.break-field input {
    width: 120px;
    font-size: 2em;
    padding: 20px;
}

.break-field label {
    margin-top: 10px;
    font-size: 1.2em;
    color: #666;
}

/* Tile styles */
.tile-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.tile-group.multi {
    max-width: 700px;
}

.tile {
    display: block;
    cursor: pointer;
    transition: all 0.3s;
}

.tile input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 40px;
    border: 3px solid #ddd;
    border-radius: 20px;
    background: white;
    transition: all 0.3s;
    min-width: 180px;
    min-height: 150px;
}

.tile.small .tile-content {
    padding: 20px 25px;
    min-width: 150px;
    min-height: 120px;
}

.tile:hover .tile-content {
    border-color: #1a8f5c;
    background: #f0fff7;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(26, 143, 92, 0.2);
}

.tile input:checked + .tile-content {
    border-color: #1a8f5c;
    background: linear-gradient(135deg, #1a8f5c 0%, #0d6b45 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(26, 143, 92, 0.4);
}

.tile input:checked + .tile-content .tile-text {
    color: white;
}

.tile-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.tile.small .tile-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.tile-text {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.tile.small .tile-text {
    font-size: 1em;
}

.hint {
    color: #888;
    font-size: 1.1em;
    margin-bottom: 20px;
    font-style: italic;
    text-align: center;
}

.btn,
.btn-secondary,
.btn-skip {
    padding: 18px 40px;
    border: none;
    border-radius: 15px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn {
    background: linear-gradient(135deg, #1a8f5c 0%, #0d6b45 100%);
    color: white;
    min-width: 200px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 143, 92, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-skip {
    background: transparent;
    border: 2px solid #ddd;
    color: #888;
}

.btn-skip:hover {
    border-color: #1a8f5c;
    color: #1a8f5c;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 50px;
}

.hidden {
    display: none !important;
}

.site-footer {
    width: 100%;
    background: none;
    padding: 20px;
    text-align: center;
    font-size: 0.85em;
    color: #fefefe;
}

.site-footer .cookies-info {
    margin-top: 15px;
    font-size: 0.9em;
    color: #fefefe;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer .footer-links {
    margin-top: 10px;
}

.site-footer a {
    color: #c0e8d7;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #d3eee3;
    text-decoration: underline;
}

/* Countdown View */
#countdown-view {
    text-align: center;
}

#countdown-view h1 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.countdown.time-countdown {
    margin-top: 15px;
    margin-bottom: 30px;
    gap: 40px;
}

.countdown.time-countdown .time-unit .number {
    font-size: 3em;
}

.countdown.time-countdown .time-unit .label {
    font-size: 0.85em;
}

.sentencja-box {
    background: linear-gradient(135deg, #1a8f5c 0%, #0d6b45 100%);
    border-radius: 15px;
    padding: 25px 30px;
    margin: 30px 0 35px 0;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(102, 234, 146, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.sentencja-emoji {
    font-size: 2.5em;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.sentencja-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.sentencja-box p {
    font-size: 1.1em;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
    color: #ffffff;
    font-weight: 500;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    flex: 1;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-unit .number {
    font-size: 4.5em;
    font-weight: bold;
    color: #1a8f5c;
    line-height: 1;
}

.time-unit .label {
    font-size: 1.1em;
    color: #666;
    margin-top: 8px;
}

.retirement-date {
    background: #f0fff7;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.retirement-date p {
    color: #555;
    font-size: 1em;
    margin: 5px 0;
}

.retirement-date strong {
    color: #1a8f5c;
}

#work-experience-info {
    margin-top: 12px;
    padding-top: 12px;
}

#work-experience-info p {
    color: #555;
    font-size: 1em;
    margin: 5px 0;
}

#work-experience-info strong {
    color: #1a8f5c;
}

#work-experience-info .experience-warning {
    color: #e74c3c;
    font-weight: 600;
}

#work-experience-info .experience-ok {
    color: #1a8f5c;
    font-weight: 600;
}

/* Date and work input groups */
.input-group.date-input,
.input-group.work-start-input {
    gap: 40px;
}

.date-field,
.work-field {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-field input,
.work-field input {
    width: 120px;
    font-size: 2em;
    padding: 20px;
    margin-bottom: 0;
}

.date-field input#birth-year,
.work-field input#work-year {
    width: 140px;
}

.date-field label,
.work-field label {
    margin-top: 10px;
    font-size: 1.2em;
    color: #666;
}

/* Break input */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        height: auto;
        min-height: 100vh;
    }

    .site-header {
        font-size: 1.8em;
        padding: 20px 15px;
    }

    .question-mark {
        font-size: 1.3em;
    }

    h1 {
        font-size: 1.8em;
    }

    #countdown-view h1 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 1.5em;
    }

    .sentencja-box {
        padding: 20px 25px;
        margin: 10px 0 40px 0;
        gap: 15px;
    }

    .sentencja-emoji {
        font-size: 2.5em;
    }

    .sentencja-box p {
        font-size: 1em;
        line-height: 1.5;
    }

    .tile-content {
        padding: 20px 25px;
        min-width: 140px;
        min-height: 120px;
    }

    .tile-icon {
        font-size: 2em;
    }

    .tile-text {
        font-size: 1em;
    }

    .tile.small .tile-content {
        padding: 15px 20px;
        min-width: 120px;
        min-height: 100px;
    }

    .date-field input,
    .work-field input {
        width: 90px;
        font-size: 1.5em;
        padding: 15px 10px;
    }

    .date-field input#birth-year,
    .work-field input#work-year {
        width: 100px;
    }

    .break-field input {
        width: 90px;
        font-size: 1.5em;
    }

    .countdown {
        gap: 20px;
    }

    .time-unit .number {
        font-size: 3em;
    }

    .countdown.time-countdown .time-unit .number {
        font-size: 1.8em;
    }

    .button-group {
        flex-wrap: wrap;
    }

    .btn, .btn-secondary, .btn-skip {
        padding: 15px 25px;
        font-size: 1em;
    }
}

/* Dark Mode */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .container {
    background: #1a1a2e;
}

body.dark-mode .site-header {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #e0e0e0;
}

body.dark-mode .step-indicator {
    color: #aaa;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="number"] {
    background: #2d2d44;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode input[type="text"]:focus,
body.dark-mode input[type="number"]:focus {
    border-color: #4ade80;
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
}

body.dark-mode input::placeholder {
    color: #888;
}

body.dark-mode .tile-content {
    background: #2d2d44;
    border-color: #444;
}

body.dark-mode .tile-text {
    color: #e0e0e0;
}

body.dark-mode .tile:hover .tile-content {
    border-color: #4ade80;
    background: #3a3a55;
}

body.dark-mode .tile input:checked + .tile-content {
    border-color: #4ade80;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

body.dark-mode .btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

body.dark-mode .btn-secondary {
    background: #3a3a55;
    color: #ccc;
}

body.dark-mode .btn-secondary:hover {
    background: #4a4a65;
}

body.dark-mode .btn-skip {
    border-color: #555;
    color: #999;
}

body.dark-mode .btn-skip:hover {
    border-color: #4ade80;
    color: #4ade80;
}

body.dark-mode .retirement-date {
    background: #2d2d44;
}

body.dark-mode .retirement-date p {
    color: #ccc;
}

body.dark-mode .retirement-date strong {
    color: #4ade80;
}

body.dark-mode #work-experience-info {
    border-top-color: #444;
}

body.dark-mode #work-experience-info p {
    color: #ccc;
}

body.dark-mode #work-experience-info strong {
    color: #4ade80;
}

body.dark-mode #work-experience-info .experience-ok {
    color: #4ade80;
}

body.dark-mode .time-unit .number {
    color: #4ade80;
}

body.dark-mode .time-unit .label {
    color: #aaa;
}

body.dark-mode .progress-bar {
    background: #3a3a55;
}

body.dark-mode .progress-fill {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

body.dark-mode .hint {
    color: #888;
}

body.dark-mode .date-field label,
body.dark-mode .work-field label,
body.dark-mode .break-field label {
    color: #aaa;
}

body.dark-mode .theme-toggle {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

body.dark-mode .sentencja-box {
    background: #2d2d44;
    border: 2px solid #4ade80;
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.15);
}

body.dark-mode .sentencja-box::before {
    background: rgba(74, 222, 128, 0.05);
}

body.dark-mode .site-footer {
    background: rgba(26, 26, 46, 0.95);
    border-top-color: #333;
    color: #aaa;
}

body.dark-mode .site-footer .cookies-info {
    color: #888;
}

body.dark-mode .site-footer a {
    color: #4ade80;
}

body.dark-mode .site-footer a:hover {
    color: #22c55e;
}
