/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.title i {
    margin-right: 15px;
    color: #ffd700;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 15px;
}

.visitor-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin: 0 auto;
    max-width: 300px;
    animation: pulse 2s infinite;
}

.visitor-counter i {
    font-size: 1.1rem;
    color: #ffd700;
}

.visitor-text {
    font-size: 0.9rem;
}

#visitorCount {
    font-weight: 700;
    color: #ffd700;
    font-size: 1.1rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Main Content */
.main {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Situation Section */
.situation-section {
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(252, 182, 159, 0.2);
}

/* Alcohol Section */
.alcohol-section {
    margin-bottom: 40px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(168, 237, 234, 0.2);
}

.situation-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #8b4513;
    text-align: center;
    font-weight: 600;
}

.alcohol-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #2c5aa0;
    text-align: center;
    font-weight: 600;
}

.situation-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.alcohol-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.situation-btn {
    background: white;
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.situation-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.situation-btn:hover::before {
    left: 100%;
}

.situation-btn i {
    font-size: 2rem;
    transition: all 0.3s ease;
}

.situation-btn span {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.situation-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.situation-btn:hover i {
    transform: scale(1.2);
}

.situation-btn.active {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.situation-btn.active span {
    color: white;
}

.situation-btn.active i {
    color: white;
    transform: scale(1.1);
}

.alcohol-btn {
    background: white;
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.alcohol-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.alcohol-btn:hover::before {
    left: 100%;
}

.alcohol-btn i {
    font-size: 2rem;
    transition: all 0.3s ease;
}

.alcohol-btn span {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.alcohol-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.alcohol-btn:hover i {
    transform: scale(1.2);
}

.alcohol-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.alcohol-btn.active span {
    color: white;
}

.alcohol-btn.active i {
    color: white;
    transform: scale(1.1);
}

/* Situation-specific colors */
.situation-btn[data-situation="meal-date"]:hover {
    border-color: #fd79a8;
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
}

.situation-btn[data-situation="solo"]:hover {
    border-color: #74b9ff;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.situation-btn[data-situation="group"]:hover {
    border-color: #fdcb6e;
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

.situation-btn[data-situation="date"]:hover {
    border-color: #a29bfe;
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
}

/* Alcohol-specific colors */
.alcohol-btn[data-alcohol="with-alcohol"]:hover {
    border-color: #fdcb6e;
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

.alcohol-btn[data-alcohol="without-alcohol"]:hover {
    border-color: #74b9ff;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.alcohol-btn[data-alcohol="any"]:hover {
    border-color: #636e72;
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
}

/* Category Section */
.category-section {
    margin-bottom: 40px;
}

.category-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.category-btn {
    padding: 12px 24px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: inherit;
}

.category-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.category-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Recommendation Section */
.recommendation-section {
    text-align: center;
    margin-bottom: 40px;
}

.result-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.result-content {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.result-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.result-description {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.situation-indicator {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 10px;
    font-style: italic;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.alcohol-indicator {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 10px;
    font-style: italic;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.recommend-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    font-family: inherit;
}

.recommend-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.recommend-btn:active {
    transform: translateY(-1px);
}

.recommend-btn i {
    margin-right: 10px;
}

/* Exclude Section */
.exclude-section {
    background: #fff3cd;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #ffeaa7;
}

.exclude-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #856404;
    text-align: center;
}

.exclude-controls {
    margin-bottom: 25px;
}

.exclude-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.exclude-select {
    padding: 12px 16px;
    border: 2px solid #ffeaa7;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.exclude-select:focus {
    outline: none;
    border-color: #fdcb6e;
    box-shadow: 0 0 0 3px rgba(253, 203, 110, 0.2);
}

.exclude-btn {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.exclude-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 48, 49, 0.3);
}

.exclude-btn:active {
    transform: translateY(0);
}

.excluded-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 50px;
    align-items: center;
}

.excluded-item {
    background: #fff;
    border: 2px solid #e17055;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #d63031;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.excluded-item:hover {
    background: #e17055;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(225, 112, 85, 0.3);
}

.excluded-item .remove-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.excluded-item .remove-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.no-excluded {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    width: 100%;
    margin: 0;
}

/* History Section */
.history-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
}

.history-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.history-item {
    background: white;
    padding: 15px 25px;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
}

.history-item:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.no-history {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    width: 100%;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card.animate {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.recommend-btn.loading {
    animation: pulse 1s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .visitor-counter {
        padding: 10px 16px;
        font-size: 0.85rem;
        max-width: 280px;
    }
    
    .visitor-text {
        font-size: 0.8rem;
    }
    
    #visitorCount {
        font-size: 1rem;
    }
    
    .main {
        padding: 25px;
    }
    
    .category-buttons {
        gap: 10px;
    }
    
    .category-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .result-card {
        padding: 30px 20px;
    }
    
    .result-title {
        font-size: 2rem;
    }
    
    .result-description {
        font-size: 1rem;
    }
    
    .recommend-btn {
        padding: 15px 30px;
        font-size: 1.1rem;
    }
    
    .history-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .result-title {
        font-size: 1.6rem;
    }
    
    .category-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 200px;
    }
    
    .situation-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .situation-btn {
        padding: 15px 10px;
    }
    
    .situation-btn i {
        font-size: 1.5rem;
    }
    
    .situation-btn span {
        font-size: 0.9rem;
    }
    
    .alcohol-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .alcohol-btn {
        padding: 15px 10px;
    }
    
    .alcohol-btn i {
        font-size: 1.5rem;
    }
    
    .alcohol-btn span {
        font-size: 0.9rem;
    }
    
    .exclude-input-group {
        flex-direction: column;
        align-items: center;
    }
    
    .exclude-select {
        width: 200px;
        min-width: auto;
    }
    
    .exclude-btn {
        width: 200px;
    }
}

/* 식당 정보 스타일 */
.restaurant-section {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.restaurant-title {
    color: #28a745;
    font-size: 1.1em;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.restaurant-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.restaurant-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 3px solid #28a745;
    transition: all 0.3s ease;
}

.restaurant-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.restaurant-name {
    font-weight: 600;
    color: #28a745;
    font-size: 1.05em;
    margin-bottom: 8px;
}

.restaurant-address {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 6px;
    line-height: 1.4;
}

.restaurant-discount {
    color: #dc3545;
    font-size: 0.9em;
    font-weight: 500;
    background: #fff5f5;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Race Section */
.race-section {
    margin-top: 50px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 24px;
}

.race-section h2 {
    text-align: center;
    margin-bottom: 8px;
}

.race-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.race-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 16px;
}

.race-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.race-label {
    font-size: 0.95rem;
    color: #444;
}

.race-input {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    min-width: 220px;
    font-family: inherit;
}

.race-start-btn {
    padding: 12px 18px;
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(24,90,157,0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.race-start-btn:hover { transform: translateY(-1px); }
.race-start-btn:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(24,90,157,0.25); }

.race-info {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.race-timer {
    background: #111827;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
}

.race-status { color: #374151; display: flex; align-items: center; }

.race-track-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.race-track {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.race-lane {
    position: relative;
    height: 46px;
    background: repeating-linear-gradient(90deg, transparent 0, transparent 10px, rgba(0,0,0,0.04) 10px, rgba(0,0,0,0.04) 12px);
    border-radius: 10px;
    overflow: hidden;
}

.race-runner {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 50px;
    min-width: 80px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: #fff;
}

.horse-runner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

/* 말 디자인 */
.horse {
    position: relative;
    width: 60px;
    height: 40px;
    transform: scale(0.8);
}

.horse-head {
    position: absolute;
    top: 5px;
    right: 0;
    width: 20px;
    height: 15px;
    background: var(--horse-body, #8B4513);
    border-radius: 40% 50% 40% 50%;
    z-index: 3;
}

.horse-ear {
    position: absolute;
    top: -2px;
    width: 4px;
    height: 6px;
    background: var(--horse-body, #8B4513);
    border-radius: 50% 50% 0 0;
}

.horse-ear:first-child {
    right: 2px;
}

.horse-ear:last-child {
    left: 2px;
}

.horse-eye {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 3px;
    height: 3px;
    background: #000;
    border-radius: 50%;
}

.horse-nose {
    position: absolute;
    bottom: 2px;
    right: 8px;
    width: 4px;
    height: 3px;
    background: #000;
    border-radius: 50%;
}

.horse-mane {
    position: absolute;
    top: 2px;
    right: -3px;
    width: 8px;
    height: 12px;
    background: var(--horse-mane, #654321);
    border-radius: 50% 0 0 50%;
    z-index: 2;
}

.horse-body {
    position: absolute;
    top: 8px;
    left: 15px;
    width: 35px;
    height: 20px;
    background: var(--horse-body, #8B4513);
    border-radius: 50%;
    z-index: 1;
}

.horse-legs {
    position: absolute;
    top: 25px;
    left: 18px;
    width: 30px;
    height: 15px;
    z-index: 0;
}

.horse-leg {
    position: absolute;
    width: 3px;
    height: 12px;
    background: var(--horse-body, #8B4513);
    border-radius: 2px;
}

.horse-leg:nth-child(1) { left: 0; }
.horse-leg:nth-child(2) { left: 8px; }
.horse-leg:nth-child(3) { left: 16px; }
.horse-leg:nth-child(4) { left: 24px; }

.horse-tail {
    position: absolute;
    top: 10px;
    left: -5px;
    width: 8px;
    height: 15px;
    background: var(--horse-mane, #654321);
    border-radius: 0 50% 50% 0;
    z-index: 0;
}

.race-badge { 
    font-weight: 700; 
    font-size: 0.75rem; 
    color: #333;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 2px;
}

.race-bubble {
    position: absolute;
    top: -25px;
    right: 25px;
    background: rgba(255,255,255,0.95);
    color: #333;
    border-radius: 15px;
    padding: 4px 8px;
    font-size: 0.7rem;
    transform: translateY(0);
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
}

.race-bubble::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid rgba(255,255,255,0.95);
}

.race-bubble.pop { transform: translateY(-4px); }

/* 말 달리기 애니메이션 */
@keyframes horseGallop {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(-1deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-1px) rotate(1deg); }
}

@keyframes legMove {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.horse-runner.running .horse {
    animation: horseGallop 0.3s infinite;
}

.horse-runner.running .horse-leg {
    animation: legMove 0.15s infinite;
}

.horse-runner.running .horse-leg:nth-child(2),
.horse-runner.running .horse-leg:nth-child(4) {
    animation-delay: 0.075s;
}

.race-result {
    margin-top: 12px;
    text-align: center;
    font-weight: 700;
}

.winner-keyword {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 6em;
    font-weight: 900;
    color: white;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.6);
    letter-spacing: 3px;
    z-index: 1000;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    padding: 30px 50px;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
    animation: winnerPulse 2s ease-in-out infinite;
}

@keyframes winnerPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes winnerBounce {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

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

.winner-keyword-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 4px solid #ff6b6b;
    border-radius: 15px;
    padding: 40px 60px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    z-index: 1000;
    text-align: center;
    animation: winnerBounce 1s ease-in-out;
}

.winner-keyword-box .keyword-text {
    font-size: 4em;
    font-weight: 900;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.winner-keyword-box .winner-info {
    font-size: 1.5em;
    color: #4a4a4a;
    font-weight: bold;
}

/* 우승 키워드 표시 영역 */
.winner-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.3);
    animation: winnerSlideIn 0.8s ease-out;
    z-index: 100;
    min-width: 300px;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.winner-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.winner-keyword {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    letter-spacing: 3px;
    margin-bottom: 15px;
    animation: winnerPulse 2s ease-in-out infinite;
}

.winner-info {
    font-size: 1.3rem;
    color: white;
    font-weight: 600;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@keyframes winnerSlideIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .winner-display {
        padding: 20px;
        min-width: 250px;
    }
    
    .winner-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .winner-keyword {
        font-size: 2.5rem;
        letter-spacing: 2px;
        margin-bottom: 10px;
    }
    
    .winner-info {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .winner-display {
        padding: 15px;
        min-width: 200px;
    }
    
    .winner-title {
        font-size: 1.2rem;
    }
    
    .winner-keyword {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .winner-info {
        font-size: 1rem;
    }
}
