/* Advanced Calculator Styles */
.advanced-calculator-section {
    margin: 40px 0;
}

.calculator-header-section {
    text-align: center;
    margin-bottom: 40px;
}

.calculator-header-section h2 {
    color: #003366;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calculator-subtitle {
    color: #495057;
    font-size: 1.2em;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Progress Indicator */
.calculator-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.calculator-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #e9ecef;
    z-index: 1;
    border-radius: 2px;
}

.progress-step {
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    margin: 0 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.progress-step.active {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    border-color: #003366;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4), 0 0 30px rgba(0, 51, 102, 0.2);
}

.progress-step.completed {
    background: #28a745;
    border-color: #28a745;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.step-number {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    line-height: 1.1;
    max-width: 70px;
}

/* Calculator Container */
.advanced-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Step Styles */
.calculator-step {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.calculator-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h3 {
    color: #003366;
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-header p {
    color: #6c757d;
    font-size: 1.1em;
    margin: 0;
}

/* Crypto Selection Card */
.crypto-selection-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    margin-bottom: 30px;
}

.calculator-explanation {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 25px;
    border-left: 4px solid #2196f3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.calculator-explanation h4 {
    color: #1565c0;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 600;
}

.calculator-explanation p {
    color: #424242;
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
}

.calculator-explanation strong {
    color: #0d47a1;
    font-weight: 600;
}

.crypto-input-section {
    margin-bottom: 30px;
}

.input-label {
    display: block;
    font-weight: 600;
    color: #003366;
    font-size: 16px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-help {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
    margin-top: 8px;
}

.help-icon {
    font-size: 16px;
}

/* Crypto Preview */
.crypto-preview {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e9ecef;
    margin-top: 20px;
}

.preview-header h4 {
    color: #003366;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.preview-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.crypto-info {
    text-align: center;
}

.crypto-symbol {
    font-size: 2em;
    font-weight: 700;
    color: #003366;
    margin-bottom: 5px;
}

.crypto-name {
    font-size: 1.1em;
    color: #495057;
    font-weight: 500;
}

.crypto-stats {
    flex: 1;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.stat-value {
    font-weight: 700;
    color: #003366;
    font-size: 14px;
}

/* Transaction Details Grid */
.transaction-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.detail-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: white;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.card-header h4 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.card-content {
    padding: 25px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #003366;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333333;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
    transform: translateY(-2px);
}

.input-group .input-help {
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Holding Period Display */
.holding-period-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}

.holding-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.holding-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.holding-value {
    font-weight: 700;
    color: #003366;
    font-size: 16px;
}

.category-badge {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge.long-term {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.next-step-btn,
.prev-step-btn {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 180px;
}

.next-step-btn:hover,
.prev-step-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.3);
}

.prev-step-btn {
    background: #6c757d;
}

.prev-step-btn:hover {
    background: #5a6268;
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

/* Results Container */
.advanced-results-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

/* Results Summary */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.summary-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
}

.summary-card.tax-owed {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

.summary-header h4 {
    color: #003366;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

.summary-value {
    font-size: 2em;
    font-weight: 700;
    color: #003366;
    margin-bottom: 5px;
    display: block;
}

.summary-subtitle {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

/* Detailed Breakdown */
.detailed-breakdown {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.detailed-breakdown h4 {
    color: #003366;
    margin-bottom: 25px;
    font-size: 1.3em;
    text-align: center;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.breakdown-value {
    font-weight: 700;
    color: #003366;
    font-size: 14px;
}

/* IRS Compliance Notice */
.irs-compliance-notice {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #2196f3;
}

.notice-icon {
    font-size: 2em;
    opacity: 0.8;
}

.notice-content h5 {
    color: #003366;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 600;
}

.notice-content p {
    color: #495057;
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
}

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-header-section h2 {
        font-size: 2em;
    }

    .calculator-progress {
        flex-direction: column;
        gap: 20px;
    }

    .progress-step {
        width: 70px;
        height: 70px;
        margin: 0;
    }

    .step-number {
        font-size: 20px;
    }

    .step-label {
        font-size: 11px;
    }

    .transaction-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .results-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .breakdown-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .step-navigation {
        flex-direction: column;
        align-items: center;
    }

    .next-step-btn,
    .prev-step-btn {
        width: 100%;
        max-width: 300px;
    }

    .results-actions {
        flex-direction: column;
        align-items: center;
    }

    .crypto-preview .preview-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* Custom Validation Modal */
.validation-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease-out;
}

.validation-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 2px solid #ffc107;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90vw;
    width: 400px;
}

.validation-modal-body {
    padding: 30px;
    text-align: center;
}

.validation-icon {
    font-size: 3em;
    margin-bottom: 20px;
    animation: shake 0.6s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.validation-modal-body p {
    color: #495057;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 500;
}

.validation-ok-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    min-width: 120px;
}

.validation-ok-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .validation-modal-content {
        width: 95vw;
        margin: 20px;
    }

    .validation-modal-body {
        padding: 25px 20px;
    }

    .validation-icon {
        font-size: 2.5em;
    }

    .validation-modal-body p {
        font-size: 15px;
    }

    .validation-ok-btn {
        padding: 10px 25px;
        font-size: 15px;
    }
}
