/* Basic Strategy Calculator Styles */

.calculator-container {
    padding: 20px 0;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
    max-width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.page-header h1 {
    color: #fff;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7), 0 0 10px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.page-header .lead {
    color: #fff;
    font-size: 1.2em;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
    background: rgba(0,0,0,0.2);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin-top: 10px;
}

/* Calculator Card */
.calculator-card {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 30px;
    color: #333;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #2a6b4f;
    padding-bottom: 15px;
}

.calculator-header h2 {
    color: #0f4c3a;
    margin: 0;
}

/* Hand Type Selector */
.hand-type-selector {
    margin-bottom: 30px;
    overflow-x: auto;
}

.hand-type-buttons {
    min-width: 100%;
    white-space: nowrap;
}

.hand-type-buttons .btn {
    border-radius: 8px;
    font-weight: bold;
    padding: 10px 15px;
    transition: all 0.3s ease;
    background: #6c757d;
    border-color: #6c757d;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hand-type-buttons .btn.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.hand-type-buttons .btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    border-color: #20c997;
    transform: translateY(-1px);
}

/* Hand Selection */
.hand-selection-section {
    margin-bottom: 30px;
}

.hand-selection-section h3 {
    color: #0f4c3a;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4em;
}

.hand-buttons-container {
    position: relative;
    min-height: 120px;
}

.hand-selection {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.hand-selection.active {
    display: block;
}

.hand-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    gap: 8px;
    justify-items: center;
    max-width: 100%;
    overflow: hidden;
}

.hand-btn {
    width: 60px;
    height: 60px;
    border: 2px solid #dee2e6;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1em;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hand-btn:hover {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #fff;
    border-color: #17a2b8;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(23, 162, 184, 0.3);
}

.hand-btn.selected {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Dealer Selection */
.dealer-selection-section {
    margin-bottom: 30px;
}

.dealer-selection-section h3 {
    color: #0f4c3a;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4em;
}

.dealer-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
    gap: 8px;
    justify-items: center;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.dealer-btn {
    width: 60px;
    height: 60px;
    border: 2px solid #dee2e6;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.2em;
    color: #856404;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dealer-btn:hover {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #fff;
    border-color: #ffc107;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.3);
}

.dealer-btn.selected {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Calculate Button */
.calculate-section {
    text-align: center;
    margin-top: 30px;
}

.calculate-button {
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 25px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculate-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(32, 201, 151, 0.4);
}

.calculate-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Results Section */
.results-card {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 30px;
    color: #333;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    animation: slideInUp 0.5s ease-out;
}

.results-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #28a745;
    padding-bottom: 15px;
}

.results-header h2 {
    color: #28a745;
    margin: 0;
}

/* Hand Display */
.hand-display {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.player-display, .dealer-display {
    text-align: center;
    flex: 1;
}

.player-display h4, .dealer-display h4 {
    color: #0f4c3a;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.hand-visual, .dealer-visual {
    font-size: 2em;
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hand-value, .dealer-value {
    font-size: 1.1em;
    color: #6c757d;
    font-weight: 500;
}

.vs-divider {
    font-size: 1.5em;
    font-weight: bold;
    color: #6c757d;
    margin: 0 20px;
    padding: 10px;
    background: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
}

/* Recommendation Display */
.recommendation-display {
    text-align: center;
    margin-bottom: 30px;
}

.action-recommendation {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.action-explanation {
    font-size: 1.2em;
    color: #495057;
    line-height: 1.6;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

/* Action Colors */
.action-hit { 
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); 
    color: #fff; 
}
.action-stand { 
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%); 
    color: #fff; 
}
.action-double { 
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); 
    color: #fff; 
}
.action-split { 
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); 
    color: #fff; 
}
.action-surrender { 
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%); 
    color: #fff; 
}

/* Additional Info */
.additional-info {
    margin-bottom: 30px;
}

.expected-value, .alternative-actions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #17a2b8;
}

.expected-value h4, .alternative-actions h4 {
    color: #17a2b8;
    margin-bottom: 15px;
}

/* Reset Section */
.reset-section {
    text-align: center;
}

.reset-section .btn {
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 20px;
}

/* Educational Content */
.educational-content {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 30px;
    color: #333;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    margin-top: 30px;
}

.educational-content h2 {
    color: #0f4c3a;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #2a6b4f;
    padding-bottom: 15px;
}

.educational-content h3 {
    color: #2a6b4f;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Usage Guide */
.usage-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #28a745;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.step-content h4 {
    color: #0f4c3a;
    margin-bottom: 10px;
}

.step-content p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.feature-item {
    text-align: center;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: #28a745;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
}

.feature-item i {
    font-size: 2.5em;
    color: #28a745;
    margin-bottom: 15px;
}

.feature-item h4 {
    color: #0f4c3a;
    margin-bottom: 15px;
}

.feature-item p {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* Strategy Basics */
.strategy-basics {
    margin-top: 40px;
}

.strategy-basics p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 25px;
}

/* Action Legend */
.action-legend {
    margin-top: 30px;
}

.action-legend h4 {
    color: #0f4c3a;
    margin-bottom: 20px;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
}

.legend-item.hit { border-left-color: #e74c3c; }
.legend-item.stand { border-left-color: #1abc9c; }
.legend-item.double { border-left-color: #3498db; }
.legend-item.split { border-left-color: #9b59b6; }
.legend-item.surrender { border-left-color: #e91e63; }

.action-code {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 1.2em;
}

.legend-item.hit .action-code { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.legend-item.stand .action-code { background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%); }
.legend-item.double .action-code { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); }
.legend-item.split .action-code { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); }
.legend-item.surrender .action-code { background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%); }

.action-name {
    font-weight: bold;
    color: #0f4c3a;
    min-width: 80px;
}

.action-desc {
    color: #6c757d;
    flex: 1;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        padding: 10px;
    }
    
    .page-header h1 {
        font-size: 2em;
    }
    
    .page-header .lead {
        font-size: 1.1em;
        padding: 8px 16px;
    }
    
    .calculator-card, .results-card, .educational-content {
        padding: 20px;
        margin: 10px 0;
    }
    
    .hand-type-buttons .btn {
        padding: 8px 12px;
        font-size: 0.8em;
    }
    
    .hand-buttons {
        grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
        gap: 6px;
    }
    
    .hand-btn, .dealer-btn {
        width: 50px;
        height: 50px;
        font-size: 0.9em;
    }
    
    .dealer-buttons {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    
    .hand-display {
        flex-direction: column;
        gap: 20px;
    }
    
    .vs-divider {
        margin: 0;
        transform: rotate(90deg);
    }
    
    .action-recommendation {
        font-size: 2em;
        padding: 15px;
    }
    
    .usage-guide {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .legend-items {
        grid-template-columns: 1fr;
    }
    
    .legend-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .calculate-button {
        padding: 12px 30px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8em;
    }
    
    .page-header .lead {
        font-size: 1em;
        padding: 6px 12px;
    }
    
    .hand-type-buttons .btn {
        padding: 6px 8px;
        font-size: 0.75em;
    }
    
    .hand-buttons {
        grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
        gap: 4px;
    }
    
    .dealer-buttons {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .hand-btn, .dealer-btn {
        width: 42px;
        height: 42px;
        font-size: 0.8em;
    }
    
    .action-recommendation {
        font-size: 1.8em;
    }
    
    .step-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .calculator-card, .results-card, .educational-content {
        padding: 15px;
        margin: 5px 0;
    }
}
