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

body {
    font-family: 'Noto Sans KR', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.screen {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

/* 메인 화면 */
#main-screen {
    text-align: center;
    padding: 60px 40px;
}

#main-screen h1 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 40px;
}

/* 버튼 스타일 */
.btn {
    padding: 15px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* 퀴즈 화면 */
.quiz-header {
    margin-bottom: 30px;
}

.quiz-header h2 {
    color: #667eea;
    margin-bottom: 20px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.question-counter {
    text-align: right;
    color: #666;
    font-size: 0.9em;
}

.quiz-content {
    min-height: 300px;
}

.quiz-section {
    margin-bottom: 30px;
}

.quiz-section label {
    display: block;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.quiz-section input[type="text"] {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

.quiz-section input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.quiz-option {
    display: block;
    padding: 15px 20px;
    margin: 10px 0;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.quiz-option:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.quiz-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* 결과 화면 */
.results-content {
    margin-top: 30px;
}

.result-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
}

.result-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.graph-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    height: 400px;
    position: relative;
}

.matrix-container {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.matrix-row {
    display: grid;
    grid-template-columns: 150px repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.matrix-cell {
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    background: white;
}

.matrix-header {
    background: #667eea;
    color: white;
}

.matrix-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.matrix-score.high {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.matrix-score.medium {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.matrix-score.low {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.group-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.group-card h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.group-members {
    list-style: none;
    margin-bottom: 15px;
}

.group-members li {
    padding: 8px;
    background: #f8f9fa;
    margin: 5px 0;
    border-radius: 5px;
}

.group-score {
    font-size: 1.2em;
    font-weight: 600;
    color: #667eea;
}

.map-controls {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.client-id-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    font-size: 0.9em;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Noto Sans KR', sans-serif;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #e0e0e0;
    position: relative;
    z-index: 1;
}

.office-marker,
.restaurant-marker {
    background: transparent !important;
    border: none !important;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
    color: #666;
}

.map-placeholder p {
    margin: 10px 0;
}

.map-info {
    font-size: 0.9em;
    color: #999;
}

.map-info a {
    color: #667eea;
    text-decoration: none;
}

.map-info a:hover {
    text-decoration: underline;
}

.guide-box {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
}

.guide-box h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.guide-box ol {
    margin-left: 20px;
    line-height: 1.8;
}

.guide-box li {
    margin: 10px 0;
}

.guide-box ul {
    margin-left: 20px;
    margin-top: 5px;
}

.guide-box code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.guide-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 4px;
    color: #856404;
}

.restaurant-list {
    margin-top: 20px;
}

.restaurant-section {
    margin-bottom: 30px;
}

.restaurant-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

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

.restaurant-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.restaurant-card::after {
    content: '👆 클릭하면 네이버 지도에서 확인';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.75em;
    color: #999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.restaurant-card:hover::after {
    opacity: 1;
}

.restaurant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

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

.restaurant-card h4 {
    color: #667eea;
    margin: 0;
    font-size: 1.3em;
}

.rating-badge {
    background: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
}

.restaurant-address {
    color: #666;
    margin: 8px 0;
    font-size: 0.95em;
}

.restaurant-type {
    color: #667eea;
    font-weight: 600;
    margin: 8px 0;
}

.walking-distance-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #4caf50;
}

.walking-distance-box strong {
    color: #2e7d32;
    display: block;
    margin-bottom: 8px;
}

.walking-distance-box p {
    color: #1b5e20;
    margin: 0;
    font-size: 0.95em;
    font-weight: 600;
    line-height: 1.5;
}

.price-estimate {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #28a745;
}

.price-estimate strong {
    color: #28a745;
    display: block;
    margin-bottom: 8px;
}

.price-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9em;
    color: #555;
}

.price-details span {
    padding: 4px 0;
}

.recommendation-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #2196f3;
}

.recommendation-box strong {
    color: #1976d2;
    display: block;
    margin-bottom: 8px;
}

.recommendation-box p {
    color: #1565c0;
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.fun-fact-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #ff9800;
}

.fun-fact-box strong {
    color: #f57c00;
    display: block;
    margin-bottom: 8px;
}

.fun-fact-box p {
    color: #e65100;
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.group-info {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    display: inline-block;
}

.restaurant-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.btn-map,
.btn-search {
    flex: 1;
    padding: 10px 15px;
    font-size: 0.9em;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-map {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-map:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-search:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.results-actions {
    text-align: center;
    margin-top: 30px;
}

/* 삭제 버튼 */
.btn-danger {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
    margin-top: 10px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e63950 0%, #e081d8 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 87, 108, 0.4);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.modal-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    border-radius: 5px;
    color: #856404;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.password-input-group {
    margin: 20px 0;
}

.password-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.password-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Noto Sans KR', sans-serif;
    transition: border-color 0.3s ease;
}

.password-input:focus {
    outline: none;
    border-color: #667eea;
}

.password-hint {
    margin-top: 8px;
    font-size: 0.85em;
    color: #999;
}

.password-hint code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.modal-actions .btn {
    min-width: 100px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }

    .screen {
        padding: 20px;
    }

    #main-screen h1 {
        font-size: 2em;
    }

    .quiz-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin: 5px 0;
    }

    .matrix-row {
        grid-template-columns: 100px repeat(auto-fit, minmax(80px, 1fr));
        font-size: 0.9em;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .restaurant-actions {
        flex-direction: column;
    }

    .restaurant-card::after {
        display: none;
    }
}

