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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #ffffff;
    color: #d4d4d4;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.subtitle {
    color: #9cdcfe;
    font-size: 1.1rem;
}

.current-timestamp {
    background: linear-gradient(135deg, #f8fafc 0%, #edf5ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.current-label {
    font-size: 0.875rem;
    color: #9cdcfe;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.current-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

#currentUnix {
    font-size: 2.5rem;
    font-weight: 700;
    color: #7ee787;
    font-family: 'Consolas', 'Monaco', monospace;
}

.current-local {
    font-size: 1.1rem;
    color: #1e293b;
}

.converter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 25px;
}

.panel h2 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    color: #9cdcfe;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

.input-wrapper input,
.input-wrapper select {
    flex: 1;
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #d4d4d4;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: #0f4ba5;
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.2);
}

.input-wrapper input[type="datetime-local"] {
    color-scheme: dark;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    color: #d4d4d4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #0f4ba5;
    color: #ffffff;
}

.copy-btn:active {
    transform: scale(0.95);
}

.btn-secondary {
    width: 100%;
    padding: 12px 20px;
    background: #e2e8f0;
    border: 1px solid #555;
    border-radius: 6px;
    color: #d4d4d4;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #4e4e52;
    border-color: #0f4ba5;
}

.results-panel {
    margin-bottom: 25px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.result-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
}

.result-item.full-width {
    grid-column: 1 / -1;
}

.result-item label {
    display: block;
    font-size: 0.8rem;
    color: #9cdcfe;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.result-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.result-value code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    color: #7ee787;
    word-break: break-all;
    flex: 1;
}

.result-value .copy-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.calendar-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header button {
    background: #e2e8f0;
    border: none;
    color: #d4d4d4;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.calendar-header button:hover {
    background: #0f4ba5;
    color: #ffffff;
}

#calendarMonthYear {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.8rem;
    color: #9cdcfe;
    padding: 10px 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #d4d4d4;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background: #e2e8f0;
    border-color: #0f4ba5;
}

.calendar-day.other-month {
    color: #666;
    background: #ffffff;
}

.calendar-day.today {
    background: #0f4ba5;
    border-color: #0f4ba5;
    color: #ffffff;
    font-weight: 600;
}

.calendar-day.selected {
    background: #7ee787;
    border-color: #7ee787;
    color: #ffffff;
    font-weight: 600;
}

.calendar-info {
    margin-top: 20px;
    text-align: center;
}

.selected-date {
    font-size: 1.1rem;
    color: #7ee787;
    font-weight: 500;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f4ba5;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    #currentUnix {
        font-size: 1.8rem;
    }

    .converter-grid {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 20px;
    }

    .calendar-day {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    #currentUnix {
        font-size: 1.5rem;
    }

    .current-value {
        flex-direction: column;
        gap: 10px;
    }

    .calendar-day-header {
        font-size: 0.7rem;
        padding: 8px 2px;
    }
}
