:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --background-color: #f7f9fc;
    --text-color: #333;
    --white-color: #fff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-family: 'Noto Sans KR', sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

.app-header {
    background: var(--white-color);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.app-header h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-color);
}

.app-nav {
    margin-top: 10px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    margin: 0 15px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-link.active,
.nav-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.app-main {
    padding: 40px 20px;
}

.app-section {
    display: none;
}

.app-section.active {
    display: block;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin: 0 0 10px;
    color: var(--primary-color);
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.upload-wrapper,
.lotto-numbers-wrapper {
    width: 100%;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.upload-button:hover {
    background-color: #357abd;
    transform: translateY(-2px);
}

.image-preview-wrapper {
    width: 100%;
    height: 350px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: #fafafa;
}

.image-preview-wrapper .placeholder {
    text-align: center;
    color: #aaa;
}

#image-preview {
    max-width: 100%;
    max-height: 100%;
    display: none;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.action-button:hover:not(:disabled) {
    background-color: #45d1b5;
    transform: translateY(-3px);
}

.action-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.results-container {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.results-container div {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    text-align: center;
}

.lotto-numbers-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    min-height: 80px;
    align-items: center;
}

.lotto-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--white-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: scale(0);
    animation: popIn 0.5s forwards;
}

@keyframes popIn {
    to {
        transform: scale(1);
    }
}

.app-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #777;
    font-size: 0.9rem;
}