/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text-dark: #1a1a1a;
    --text-medium: #666;
    --text-light: #999;
    --bg-light: #fafafa;
    --bg-white: #ffffff;
    --bg-dark: #2a2a2a;
    --border-dark: #1a1a1a;
    --border-medium: #d0d0d0;
    --border-light: #e8e8e8;
}

body {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow: hidden;
}

/* Main container */
#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.screen-container {
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    overflow-y: auto;
    padding: 2rem 0;
}

/* Screen transitions */
.screen {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.screen.active {
    opacity: 1;
}

.screen.fade-out {
    opacity: 0;
}

/* Typography */
h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.3;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.area-number {
    font-size: 1rem;
    color: var(--text-medium);
    font-weight: 400;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

p {
    font-size: 1.25rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Content area fade */
.content-area {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
    transition: opacity 0.6s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Buttons */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 3rem auto 0 auto;
    width: 100%;
    max-width: 500px;
}

button {
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    font-weight: 400;
    padding: 1.1rem 2rem;
    background-color: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border-dark);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    position: relative;
    letter-spacing: 0.01em;
}

button.visible {
    opacity: 1;
    transform: translateY(0);
}

button:hover {
    background-color: var(--text-dark);
    color: var(--bg-white);
    transform: translateX(4px);
}

button:focus {
    outline: 2px solid var(--text-dark);
    outline-offset: 4px;
}

button:active {
    transform: translateX(2px);
}

button.primary {
    background-color: var(--text-dark);
    color: var(--bg-white);
    border-color: var(--text-dark);
}

button.primary:hover {
    background-color: var(--bg-white);
    color: var(--text-dark);
    box-shadow: inset 0 0 0 2px var(--text-dark);
}

button.secondary {
    background-color: transparent;
}

/* Summary screen */
.summary-list {
    list-style: none;
    margin: 2rem auto;
    text-align: left;
    width: 100%;
    max-width: 500px;
}

.summary-list li {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    border: 2px solid transparent;
}

.summary-list li.sorted {
    border-color: var(--border-medium);
    background-color: var(--bg-white);
}

.summary-list li.needs-help {
    border-color: var(--border-dark);
    background-color: var(--bg-light);
}

.summary-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Contact screen */
.contact-pairs {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-pair {
    text-align: center;
}

.contact-pair p {
    margin-bottom: 0.5rem;
}

.contact-pair a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-dark);
    padding-bottom: 2px;
    transition: all 0.2s ease;
}

.contact-pair a:hover {
    border-bottom-width: 4px;
    padding-bottom: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1.1rem;
    }

    .button-container {
        max-width: 100%;
    }

    button {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
    }
}

@media (max-width: 480px) {
    #app {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    p {
        font-size: 1rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .screen {
        transition: none;
    }

    button {
        transition: none;
    }

    .content-area {
        animation: none !important;
        opacity: 1 !important;
    }
}
