:root {
    --primary: #ff6b6b;
    --primary-dark: #ff4757;
    --background: #1e1e2e;
    --surface: #2a2a3c;
    --text: #e2e2e2;
    --text-secondary: #b2b2b2;
    --accent: #ffd700;
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 2rem;
    flex: 1;
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    text-align: center;
    color: var(--primary);
    margin: 0;
    letter-spacing: 0.1em;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: -1.5rem;
}

h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.time-display {
    background-color: var(--surface);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.time {
    font-size: 2.5rem;
    font-family: 'Cinzel', serif;
    color: var(--primary);
    letter-spacing: 0.1em;
    margin: 1.5rem 0;
}

.time-input {
    background-color: var(--surface);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
}

input[type="datetime-local"] {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 2px solid var(--primary);
    padding: 0.75rem;
    border-radius: 8px;
    font-family: inherit;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

input[type="datetime-local"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

button {
    background-color: var(--primary);
    color: var(--background);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.explanation-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.cursed-input {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cursed-input input {
    width: 4rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 2px solid var(--primary);
    padding: 0.75rem;
    border-radius: 8px;
    font-family: inherit;
    text-align: center;
    transition: all 0.3s ease;
}

.cursed-input input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.custom-result, #reverse-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 2px solid rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.02);
}

@media (min-width: 768px) {
    .conversion-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 767px) {
    .conversion-section {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .container {
        padding: 1rem;
    }

    .time {
        font-size: 2rem;
    }

    input[type="datetime-local"] {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Add these new styles */
.copy-btn, .paste-btn {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
    border: 1px solid var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.copy-btn:hover, .paste-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(0);
}

.paste-controls {
    margin-bottom: 1rem;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: var(--surface);
    color: var(--text);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    z-index: 1000;
    width: auto;
    max-width: 90%;
}

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

.toast.error {
    background: #ff4757;
    color: white;
}

/* Improve responsive design */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
        gap: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .time {
        font-size: 1.5rem;
    }

    .time-display, .time-input {
        padding: 1rem;
    }

    .cursed-input {
        gap: 0.5rem;
    }

    .cursed-input input {
        width: calc(33.33% - 1rem);
        min-width: 3rem;
        padding: 0.5rem;
    }

    input[type="datetime-local"] {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

/* Add better tablet support */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .time {
        font-size: 2rem;
    }

    .cursed-input {
        gap: 0.75rem;
    }
}

/* Improve layout for larger screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

    .conversion-section {
        gap: 3rem;
    }
}

/* Add support for dark mode preferences */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #13131f;
        --surface: #1e1e2e;
    }
}

/* Add better touch target sizes for mobile */
@media (hover: none) {
    button, .copy-btn, .paste-btn {
        min-height: 44px;
        min-width: 44px;
    }

    input {
        min-height: 44px;
    }
}