/* 전체 스타일 초기화 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 스타일 */
header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.subtitle {
    font-size: 1.2em;
    color: #7f8c8d;
    font-style: italic;
    margin: 8px 0 0 0;
}

/* 섹션 공통 스타일 */
section {
    background: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

/* 폼 그룹 스타일 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
    background: white;
}

/* 꿈 분석 입력 */
.dream-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dream-inputs label {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

/* 버튼 스타일 */
.main-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    width: 100%;
    margin-top: 20px;
}

.main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.main-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.check-btn, .save-btn, .compare-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.check-btn:hover, .save-btn:hover, .compare-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.clear-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* 생성 횟수 표시 */
.generation-count {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: #ecf0f1;
    border-radius: 10px;
    font-weight: 600;
    color: #2c3e50;
}

/* 분석 결과 스타일 */
.analysis-result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #3498db;
    font-size: 1.1em;
    line-height: 1.8;
}

/* 번호 컨테이너 */
.numbers-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lotto-number-set {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #27ae60;
    position: relative;
}

.number-set-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.generation-time {
    font-size: 0.9em;
    color: #7f8c8d;
}

.number-balls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.number-ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* 로또 번호 색상 */
.number-ball.color-1 { background: linear-gradient(45deg, #ffc107, #ff8f00); }
.number-ball.color-2 { background: linear-gradient(45deg, #2196f3, #1976d2); }
.number-ball.color-3 { background: linear-gradient(45deg, #f44336, #d32f2f); }
.number-ball.color-4 { background: linear-gradient(45deg, #9c27b0, #7b1fa2); }
.number-ball.color-5 { background: linear-gradient(45deg, #4caf50, #388e3c); }
.number-ball.bonus { background: linear-gradient(45deg, #ff5722, #e64a19); }

/* 저장된 번호 스타일 */
.saved-container {
    max-height: 400px;
    overflow-y: auto;
}

.saved-number-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-left: 4px solid #e74c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-info {
    flex: 1;
}

.saved-date {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* 당첨번호 섹션 */
.winning-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.winning-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.winning-result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.winning-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.winning-numbers {
    margin: 20px 0;
}

.main-numbers, .bonus-number {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-numbers span, .bonus-number span {
    font-weight: 600;
    color: #2c3e50;
    min-width: 100px;
}

/* 비교 결과 */
.comparison-result {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #27ae60;
    margin-top: 20px;
}

.comparison-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.match-info {
    font-weight: 600;
    color: #27ae60;
    margin-bottom: 10px;
}

.no-saved {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 20px;
}

/* 숨김 클래스 */
.hidden {
    display: none;
}

/* 푸터 */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    font-size: 1.1em;
    color: #2c3e50;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    section {
        padding: 20px;
    }
    
    .number-balls {
        justify-content: center;
    }
    
    .number-ball {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .winning-buttons {
        flex-direction: column;
    }
    
    .main-numbers, .bonus-number {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 로딩 애니메이션 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* 성공/오류 메시지 */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 4px solid #28a745;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 10px 0;
    border-left: 4px solid #dc3545;
}

/* 번호 비교 결과 스타일 */
.number-ball.match {
    box-shadow: 0 0 15px #ffd700 !important;
    border: 3px solid #ffd700 !important;
}

.number-ball.no-match {
    background: #95a5a6 !important;
    color: white !important;
    box-shadow: 0 3px 8px rgba(149, 165, 166, 0.3) !important;
}

/* 공유 섹션 스타일 */
.share-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.share-message {
    margin-bottom: 20px;
}

.share-message p {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.share-buttons-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.regenerate-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #e74c3c;
    border: 2px solid #e74c3c;
    padding: 15px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    min-width: 150px;
}

.regenerate-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.regenerate-btn:active {
    transform: translateY(-1px);
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.share-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 140px;
}

.share-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.share-btn:active {
    transform: translateY(-1px);
}

/* 반응형 공유 버튼 */
@media (max-width: 768px) {
    .share-buttons-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .share-btn, .regenerate-btn {
        width: 100%;
        max-width: 250px;
        margin: 5px 0;
    }
    
    .share-message p {
        font-size: 1.1em;
    }
} 

/* 공유 팝업 스타일 */
.share-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.share-popup-content {
    background: white;
    border-radius: 20px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.share-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.share-popup-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5em;
}

.close-popup {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #95a5a6;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-popup:hover {
    background: #f8f9fa;
    color: #e74c3c;
    transform: scale(1.1);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
}

.share-option:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.share-option:active {
    transform: translateY(-1px);
}

.share-icon {
    font-size: 2em;
    margin-bottom: 8px;
    display: block;
}

.share-option span:last-child {
    font-size: 0.9em;
    text-align: center;
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .share-popup-content {
        width: 95%;
        margin: 20px;
        max-height: 90vh;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .share-option {
        padding: 15px 10px;
    }
    
    .share-icon {
        font-size: 1.8em;
        margin-bottom: 6px;
    }
    
    .share-option span:last-child {
        font-size: 0.8em;
    }
} 