#dividend-calculator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

#dividend-calculator * {
    box-sizing: border-box;
}

.dc-container {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.dc-header {
    margin-bottom: 24px;
}

.dc-title {
    font-size: 28px;
    font-weight: 800;
    color: #0a0a0a;
    margin: 0 0 8px 0;
    position: relative;
    padding-bottom: 12px;
}

.dc-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f7fe78, #d6e85c);
    border-radius: 2px;
}

.dc-subtitle {
    font-size: 15px;
    color: #666666;
    line-height: 1.5;
}

.dc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dc-input-group {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    padding: 16px;
    border-radius: 12px;
}

.dc-input-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 8px;
}

.dc-input-hint {
    font-size: 11px;
    color: #888888;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.dc-input-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #ffffff;
}

.dc-input-field:focus {
    outline: none;
    border-color: #f7fe78;
    box-shadow: 0 0 0 3px rgba(247, 254, 120, 0.2);
}

.dc-input-row {
    display: flex;
    gap: 8px;
}

.dc-input-row .dc-input-field {
    flex: 1;
}

.dc-input-row .dc-select-field {
    width: 80px;
    flex-shrink: 0;
}

.dc-input-type-toggle {
    display: flex;
    background: #e5e5e5;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 12px;
}

.dc-input-type-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dc-input-type-btn.active {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dc-input-type-btn:hover:not(.active) {
    color: #333;
}

.dc-select-field {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.dc-select-field:focus {
    outline: none;
    border-color: #f7fe78;
    box-shadow: 0 0 0 3px rgba(247, 254, 120, 0.2);
}

.dc-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.dc-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    background: #e5e5e5;
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dc-toggle.active {
    background: linear-gradient(135deg, #f7fe78, #d6e85c);
}

.dc-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dc-toggle.active::after {
    left: 25px;
}

.dc-toggle-label {
    font-size: 14px;
    color: #333333;
}

.dc-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0a0a0a;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-section-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f7fe78, #d6e85c);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.dc-btn-calculate {
    background: linear-gradient(135deg, #f7fe78, #d6e85c);
    color: #000000;
    border: 1px solid #d6e85c;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.dc-btn-calculate:hover {
    background: linear-gradient(135deg, #d6e85c, #b9d047);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 254, 120, 0.3);
}

.dc-btn-calculate:active {
    transform: scale(0.98);
}

.dc-results {
    display: none;
}

.dc-results.visible {
    display: block;
}

.dc-results-summary {
    background: linear-gradient(135deg, #fffef0, #f0ffe0);
    border-left: 4px solid #f7fe78;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.dc-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dc-summary-item {
    text-align: center;
}

.dc-summary-value {
    font-size: 28px;
    font-weight: 800;
    color: #0a0a0a;
}

.dc-summary-value.highlight {
    color: #5a7a00;
}

.dc-summary-label {
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.dc-chart-container {
    margin-bottom: 24px;
}

.dc-chart-title {
    font-size: 16px;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: 16px;
}

.dc-chart-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dc-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 200px;
    padding: 20px 0;
    border-bottom: 2px solid #e5e5e5;
    min-width: 500px;
}

.dc-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 50px;
}

.dc-bar {
    width: 100%;
    max-width: 60px;
    background: linear-gradient(180deg, #f7fe78, #d6e85c);
    border-radius: 6px 6px 0 0;
    transition: all 0.3s ease;
    position: relative;
    min-height: 4px;
}

.dc-bar:hover {
    background: linear-gradient(180deg, #d6e85c, #b9d047);
    transform: scaleY(1.02);
}

.dc-bar-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: #0a0a0a;
    white-space: nowrap;
}

.dc-bar-label {
    font-size: 12px;
    color: #666666;
    font-weight: 600;
    white-space: nowrap;
}

.dc-table-container {
    overflow-x: auto;
    margin-bottom: 24px;
}

.dc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dc-table th {
    background: #fafafa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: #0a0a0a;
    border-bottom: 2px solid #e5e5e5;
}

.dc-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333333;
}

.dc-table tr:hover td {
    background: rgba(247, 254, 120, 0.08);
}

.dc-table .highlight {
    color: #5a7a00;
    font-weight: 700;
}

.dc-table .negative {
    color: #dc2626;
}

.dc-info-box {
    background: linear-gradient(135deg, #e8f5ff, #f0f9ff);
    border-left: 4px solid #3b82f6;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.dc-info-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 8px;
}

.dc-info-text {
    font-size: 13px;
    color: #333333;
    line-height: 1.6;
}

.dc-disclaimer {
    background: #fff9e6;
    border: 1px solid #f7fe78;
    padding: 16px;
    border-radius: 10px;
    font-size: 12px;
    color: #666666;
    line-height: 1.5;
}

.dc-disclaimer strong {
    color: #0a0a0a;
}

.dc-tax-breakdown {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.dc-tax-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.dc-tax-row:last-child {
    border-bottom: none;
    font-weight: 700;
    color: #0a0a0a;
}

.dc-tax-label {
    color: #666666;
}

.dc-tax-value {
    font-weight: 600;
    color: #333333;
}

.dc-collapse-toggle {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    font-weight: 600;
}

.dc-collapse-toggle:hover {
    text-decoration: underline;
}

.dc-collapsed {
    display: none;
}

@media (max-width: 768px) {
    #dividend-calculator {
        padding: 16px;
    }

    .dc-container {
        padding: 16px;
    }

    .dc-title {
        font-size: 24px;
    }

    .dc-form-grid {
        grid-template-columns: 1fr;
    }

    .dc-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dc-summary-value {
        font-size: 24px;
    }

    .dc-chart {
        height: 180px;
        min-width: 600px;
        gap: 8px;
    }

    .dc-bar-value {
        font-size: 10px;
        top: -20px;
    }

    .dc-bar-label {
        font-size: 10px;
    }

    .dc-chart-scroll-hint {
        display: block;
        text-align: center;
        font-size: 11px;
        color: #888;
        margin-top: 8px;
    }
}

.dc-chart-scroll-hint {
    display: none;
}