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

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes sparkle {
    0%, 100% {
        box-shadow: 0 4px 25px rgba(34, 105, 247, 0.3),
                    0 0 30px rgba(219, 242, 104, 0.2);
    }
    50% {
        box-shadow: 0 8px 35px rgba(34, 105, 247, 0.5),
                    0 0 40px rgba(219, 242, 104, 0.4);
    }
}

body {
    background-color: #f0f4f8;
    padding: 20px;
}

#dividend-calculator-3162 {
    max-width: 1000px; /* PCì™€ ëª¨ë°"ì¼ ëª¨ë'ì— ì ìš©ë˜ëŠ" ìµœëŒ€ ë„ˆë¹„ */
    width: 100%; /* ëª¨ë°"ì¼ì—ì„œ 100% ë„ˆë¹„ë¡œ ìœ ë™ì„± í™•ë³´ */
    margin: 0 auto; /* ì¤'ì•™ ì •ë ¬ */
    padding: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2269F7 50%, #4a90e2 100%);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(34, 105, 247, 0.25);
    position: relative;
    overflow: hidden;
    color: #333;
    box-sizing: border-box;
}

/* 1000px 이상 (데스크톱): 완전 중앙 정렬 */
@media (min-width: 1001px) {
    #dividend-calculator-3162 {
        width: 1000px !important; /* 데스크톱에서 너비를 1000px로 고정 */
        max-width: 1000px !important;
        margin: 0 auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* 1000px 미만 (모바일, 태블릿 포함) */
@media (max-width: 1000px) {
    #dividend-calculator-3162 {
        width: 100% !important; /* 모바일에서 100% 너비 사용 */
        max-width: unset !important; /* 최대 너비 제한 해제 */
        margin: 0 auto !important;
        box-sizing: border-box !important;
        /* position, left, transform은 데스크탑에서만 필요하므로 여기서는 삭제하거나 unset */
        position: static !important;
        left: auto !important;
        transform: none !important;
    }
}

#dividend-calculator-3162::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
        rgba(219, 242, 104, 0.1) 0%,
        transparent 50%,
        rgba(219, 242, 104, 0.05) 100%);
    pointer-events: none;
}

#dividend-calculator-3162 h2 {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

#dividend-calculator-3162 .dividend-input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
    position: relative;
    z-index: 1;
}

#dividend-calculator-3162 .input-row-container {
    display: flex;
    gap: 25px;
    margin-bottom: 35px;
}

#dividend-calculator-3162 .dividend-input-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex: 1;
}

#dividend-calculator-3162 .dividend-input-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #DBF268, transparent);
    transition: left 0.5s;
}

#dividend-calculator-3162 .dividend-input-item:hover::before {
    left: 100%;
}

#dividend-calculator-3162 .dividend-input-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 45px rgba(34, 105, 247, 0.2);
    background: rgba(255, 255, 255, 0.98);
}

#dividend-calculator-3162 .dividend-input-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #2269F7;
    font-weight: 700;
    font-size: 15px;
}

#dividend-calculator-3162 .dividend-input-item input,
#dividend-calculator-3162 .dividend-input-item select {
    width: 100%;
    padding: 16px;
    border: 2px solid rgba(34, 105, 247, 0.2);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.8);
}

#dividend-calculator-3162 .dividend-input-item input:focus,
#dividend-calculator-3162 .dividend-input-item select:focus {
    outline: none;
    border-color: #DBF268;
    box-shadow: 0 0 0 4px rgba(219, 242, 104, 0.3);
    background: white;
}

#dividend-calculator-3162 .dividend-rate-slider {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

#dividend-calculator-3162 .dividend-rate-slider label {
    margin-bottom: 5px;
}

#dividend-calculator-3162 .slider-container {
    position: relative;
    margin: 10px 0;
}

#dividend-calculator-3162 .dividend-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg,
        #ff6b6b 0%, #ffa500 25%, #32cd32 50%, #1e90ff 75%, #9370db 100%);
    outline: none;
    cursor: pointer;
}

#dividend-calculator-3162 .dividend-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2269F7, #DBF268);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 105, 247, 0.4);
    transition: all 0.2s ease;
}

#dividend-calculator-3162 .dividend-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(34, 105, 247, 0.6);
}

#dividend-calculator-3162 .dividend-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2269F7, #DBF268);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(34, 105, 247, 0.4);
}

#dividend-calculator-3162 .slider-display {
    text-align: center;
    margin-top: 10px;
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #2269F7, #1B5CE3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#dividend-calculator-3162 .slider-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    padding: 0 12px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

#dividend-calculator-3162 .reinvestment-toggle-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    min-height: 120px;
}
        
#dividend-calculator-3162 .reinvestment-label {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #2269F7;
}

#dividend-calculator-3162 .toggle-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

#dividend-calculator-3162 .toggle-switch {
    position: relative;
    width: 60px;
    height: 34px;
    background: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    padding: 3px;
    box-sizing: border-box;
}
        
#dividend-calculator-3162 .toggle-switch.active {
    background: linear-gradient(135deg, #2269F7, #DBF268);
}

#dividend-calculator-3162 .toggle-slider {
    position: absolute;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#dividend-calculator-3162 .toggle-switch.active .toggle-slider {
    transform: translateX(26px);
}
        
#dividend-calculator-3162 .toggle-status {
    font-weight: 700;
    font-size: 16px;
    min-width: 25px;
    text-align: right;
    transition: color 0.3s ease;
}

#dividend-calculator-3162 .toggle-status.on {
    color: #2269F7;
}

#dividend-calculator-3162 .toggle-status.off {
    color: #999;
}

#dividend-calculator-3162 .dividend-calculate-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #2269F7 0%, #DBF268 100%);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 35px 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: sparkle 3s ease-in-out infinite;
}

#dividend-calculator-3162 .dividend-calculate-btn::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;
}

#dividend-calculator-3162 .dividend-calculate-btn:hover::before {
    left: 100%;
}

#dividend-calculator-3162 .dividend-calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(34, 105, 247, 0.4);
}

#dividend-calculator-3162 .dividend-calculate-btn.loading {
    animation: pulse 1.5s ease-in-out infinite;
    pointer-events: none;
}

#dividend-calculator-3162 .dividend-results {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 35px;
    border-radius: 25px;
    margin: 35px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

#dividend-calculator-3162 .dividend-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

#dividend-calculator-3162 .dividend-result-item {
    text-align: center;
    padding: 25px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border: 1px solid rgba(34, 105, 247, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#dividend-calculator-3162 .dividend-result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2269F7, #DBF268, #2269F7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#dividend-calculator-3162 .dividend-result-item:hover::before {
    opacity: 1;
}

#dividend-calculator-3162 .dividend-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(34, 105, 247, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
}

#dividend-calculator-3162 .dividend-result-item h4 {
    margin: 0 0 15px 0;
    color: #2269F7;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#dividend-calculator-3162 .dividend-result-item .value {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #2269F7, #1B5CE3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#dividend-calculator-3162 .dividend-result-item.highlight .value {
    background: linear-gradient(135deg, #DBF268, #a6c23b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
}

#dividend-calculator-3162 .dividend-result-item.dividend .value {
    background: linear-gradient(135deg, #F69852, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#dividend-calculator-3162 .dividend-charts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 35px 0;
}

#dividend-calculator-3162 .dividend-chart-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex: 1 1 450px;
    position: relative;
    height: 500px;
}

#dividend-calculator-3162 .dividend-chart-title {
    text-align: center;
    color: #2269F7;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#dividend-calculator-3162 .dividend-comment {
    background: linear-gradient(135deg, rgba(246, 152, 82, 0.9) 0%, rgba(246, 152, 82, 0.7) 100%);
    border: 2px solid #F69852;
    border-radius: 18px;
    padding: 20px;
    margin-top: 25px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 8px 25px rgba(246, 152, 82, 0.3);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

#dividend-calculator-3162 .info-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

#dividend-calculator-3162 .info-section h3 {
    color: #DBF268;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

#dividend-calculator-3162 .unit-indicator {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #2269F7;
    font-weight: 600;
    pointer-events: none;
    opacity: 0.7;
}

/* ëª¨ë°"ì¼ ë°˜ì'í˜• ì¡°ì • */
@media (max-width: 768px) {
    #dividend-calculator-3162 {
        padding: 20px; /* ëª¨ë°"ì¼ì—ì„œ íŒ¨ë"© ì¡°ì • */
    }

    #dividend-calculator-3162 h2 {
        font-size: 26px;
        margin-bottom: 30px;
    }

    #dividend-calculator-3162 .dividend-input-group {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #dividend-calculator-3162 .input-row-container {
        flex-direction: column;
        gap: 20px;
    }

    #dividend-calculator-3162 .dividend-input-item {
        padding: 20px;
    }

    #dividend-calculator-3162 .dividend-rate-slider, 
    #dividend-calculator-3162 .reinvestment-toggle-container {
        min-height: unset;
    }

    #dividend-calculator-3162 .dividend-result-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    #dividend-calculator-3162 .dividend-result-item .value {
        font-size: 20px;
    }

    #dividend-calculator-3162 .dividend-result-item.highlight .value {
        font-size: 24px;
    }

    #dividend-calculator-3162 .dividend-charts-container {
        flex-direction: column;
        gap: 20px;
    }

    #dividend-calculator-3162 .dividend-chart-container {
        height: 400px;
        padding: 20px;
    }
}