:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --dark: #2d3436;
    --light: #dfe6e9;
    --glass: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.glass-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.9rem;
    color: #b2bec3;
    margin-bottom: 40px;
}

.welcome-message {
    padding: 60px 0;
    transition: opacity 0.5s ease;
}

.icon-pulse {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

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

.result-area {
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 0.8s forwards;
}

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

.hidden {
    display: none !important;
}

.lotto-rows-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.row-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 20px;
    border-radius: 16px;
    transition: transform 0.3s;
    position: relative;
}

.row-wrapper:hover {
    transform: scale(1.02);
    background: rgba(0, 0, 0, 0.3);
}

.row-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #6c5ce7;
    width: 40px;
}

.balls-container {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.lotto-ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.prob-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 80px;
    position: relative;
    cursor: pointer;
}

.prob-text {
    font-size: 0.6rem;
    color: #b2bec3;
}

.prob-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2ecc71;
}

.info-icon {
    font-size: 0.7rem;
    color: #a29bfe;
    margin-top: 2px;
}

/* 툴팁 스타일 */
.detail-tooltip {
    position: absolute;
    bottom: 120%;
    right: 0;
    width: 280px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 92, 231, 0.5);
    border-radius: 12px;
    padding: 15px;
    font-size: 0.75rem;
    text-align: left;
    color: #dfe6e9;
    line-height: 1.6;
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.detail-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 15px;
    border-width: 8px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.prob-badge:hover .detail-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.main-btn {
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(108, 92, 231, 0.3);
    transition: all 0.3s;
}

.main-btn:hover {
    background: #5b48d1;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(108, 92, 231, 0.4);
}

.sub-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.sub-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

footer {
    margin-top: 40px;
    font-size: 0.7rem;
    color: #636e72;
}

@media (max-width: 600px) {
    .glass-container { padding: 25px; }
    .row-wrapper { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .balls-container { width: 100%; order: 3; }
    .prob-badge { order: 2; align-items: center; width: 100%; margin-bottom: 10px; }
    .row-label { order: 1; }
    .button-group { flex-direction: column; }
    .detail-tooltip { right: auto; left: 50%; transform: translateX(-50%) translateY(10px); width: 250px; }
    .prob-badge:hover .detail-tooltip { transform: translateX(-50%) translateY(0); }
}
