/* 연금복권 720+ 번호 생성기 CSS */
.plg-lottery-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* 연금복권 로고 디자인 색상 변수 */
.plg-lottery-container.plg-style-colorful {
    --plg-primary: #007cba;
    --plg-secondary: #ff6b9d;
    --plg-accent: #ffd700;
    --plg-success: #4caf50;
    --plg-gradient-start: #667eea;
    --plg-gradient-end: #764ba2;
    --plg-orange: #ff9500;
    --plg-blue: #007cba;
    --plg-pink: #ff6b9d;
    --plg-yellow: #ffd700;
    --plg-green: #4caf50;
}

/* 헤더 섹션 */
.plg-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.plg-logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.plg-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.plg-logo-icon {
    display: flex;
    align-items: center;
    gap: 15px;
}

.plg-circles {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: 10px;
}

.plg-circles .circle {
    border-radius: 50%;
    display: inline-block;
    margin-right: -5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.plg-circles .c1 {
    width: 8px;
    height: 8px;
    background: #ff4444;
}

.plg-circles .c2 {
    width: 12px;
    height: 12px;
    background: #ff9500;
}

.plg-circles .c3 {
    width: 16px;
    height: 16px;
    background: #007cba;
    z-index: 3;
}

.plg-circles .c4 {
    width: 20px;
    height: 20px;
    background: #ffd700;
    z-index: 2;
}

.plg-circles .c5 {
    width: 24px;
    height: 24px;
    background: #ff6b9d;
    z-index: 1;
}

.plg-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.plg-logo-text .main-text {
    font-size: 28px;
    font-weight: 700;
    color: #007cba;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.plg-logo-text .sub-text {
    font-size: 32px;
    font-weight: 800;
    color: #ff6b9d;
    line-height: 1;
    margin-top: -5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.plg-title {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin: 10px 0;
}

.plg-description {
    color: #666;
    font-size: 14px;
    margin: 0;
    opacity: 0.8;
}

/* 컨트롤 섹션 */
.plg-controls {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.plg-control-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.plg-control-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.plg-select, .plg-input {
    padding: 10px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.plg-select:focus, .plg-input:focus {
    outline: none;
    border-color: var(--plg-primary);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.plg-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 버튼 스타일 */
.plg-button {
    padding: 15px 30px; /* 더 큰 터치 영역 */
    border: none;
    border-radius: 25px;
    font-size: 16px; /* 모바일에서 더 큰 폰트 */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px; /* 최소 터치 높이 */
    min-width: 120px; /* 최소 터치 너비 */
    touch-action: manipulation; /* 더블탭 줌 방지 */
}

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

.plg-button:hover:before {
    left: 100%;
}

.plg-button.primary {
    background: linear-gradient(135deg, var(--plg-primary), var(--plg-gradient-start));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.plg-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.plg-button.secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.plg-button.accent {
    background: linear-gradient(135deg, var(--plg-secondary), var(--plg-accent));
    color: white;
}

.plg-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 로딩 스피너 */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 결과 섹션 */
.plg-results {
    margin: 25px 0;
}

.plg-numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.plg-number-item {
    background: linear-gradient(135deg, var(--plg-gradient-start), var(--plg-gradient-end));
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plg-number-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.plg-number-item:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.plg-number-item:hover:before {
    transform: rotate(45deg) scale(1.2);
}

.plg-group {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.plg-number {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

/* 통계 섹션 */
.plg-statistics {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.plg-statistics h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.plg-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.plg-stat-item {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
}

.plg-stat-item .stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.plg-stat-item .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--plg-primary);
}

/* 이력 섹션 */
.plg-history {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

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

.plg-history-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.plg-button.small {
    padding: 6px 12px;
    font-size: 12px;
    min-height: auto;
}

.plg-history-item {
    padding: 12px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
    transition: all 0.2s ease;
}

.plg-history-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.plg-history-item .history-timestamp {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
}

.plg-history-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.plg-history-number {
    background: linear-gradient(135deg, var(--plg-primary), var(--plg-gradient-start));
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.plg-no-history {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px 0;
}

/* 공유 섹션 */
.plg-share-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.plg-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.plg-button.outline {
    background: transparent;
    border: 2px solid var(--plg-primary);
    color: var(--plg-primary);
}

.plg-button.outline:hover {
    background: var(--plg-primary);
    color: white;
}

/* 모달 스타일 */
.plg-modal {
    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: 9999;
    backdrop-filter: blur(5px);
}

.plg-modal-content {
    background: white;
    border-radius: 15px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.plg-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e8ed;
}

.plg-modal-header h4 {
    margin: 0;
    color: #333;
}

.plg-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.plg-modal-body {
    padding: 20px;
}

.plg-modal-footer {
    padding: 20px;
    border-top: 1px solid #e1e8ed;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.plg-form-group {
    margin-bottom: 20px;
}

.plg-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.plg-form-group input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 14px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .plg-lottery-container {
        margin: 10px;
        padding: 20px;
        border-radius: 15px;
    }
    
    .plg-logo-text .main-text {
        font-size: 22px;
    }
    
    .plg-logo-text .sub-text {
        font-size: 26px;
    }
    
    .plg-control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .plg-action-buttons {
        flex-direction: column;
    }
    
    .plg-button {
        width: 100%;
        justify-content: center;
    }
    
    .plg-numbers-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .plg-number-item {
        padding: 15px 10px;
    }
    
    .plg-number {
        font-size: 18px;
        letter-spacing: 1px;
    }
    
    .plg-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .plg-history-numbers {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .plg-circles .circle {
        margin-right: -3px;
    }
    
    .plg-circles .c1 { width: 6px; height: 6px; }
    .plg-circles .c2 { width: 10px; height: 10px; }
    .plg-circles .c3 { width: 14px; height: 14px; }
    .plg-circles .c4 { width: 18px; height: 18px; }
    .plg-circles .c5 { width: 22px; height: 22px; }
    
    .plg-numbers-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .plg-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plg-number-item {
    animation: fadeInUp 0.5s ease forwards;
}

.plg-number-item:nth-child(2) { animation-delay: 0.1s; }
.plg-number-item:nth-child(3) { animation-delay: 0.2s; }
.plg-number-item:nth-child(4) { animation-delay: 0.3s; }
.plg-number-item:nth-child(5) { animation-delay: 0.4s; }

/* 다크 모드 지원 */
@media (prefers-color-scheme: dark) {
    .plg-lottery-container {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
    
    .plg-title {
        color: #ecf0f1;
    }
    
    .plg-description {
        color: #bdc3c7;
    }
    
    .plg-controls, .plg-statistics, .plg-history, .plg-share-section {
        background: rgba(44, 62, 80, 0.9);
        color: #ecf0f1;
    }
    
    .plg-select, .plg-input {
        background: #34495e;
        border-color: #4a5568;
        color: #ecf0f1;
    }
    
    .plg-modal-content {
        background: #2c3e50;
        color: #ecf0f1;
    }
}