/* Calculator Page Specific Styles */

.calculator-section {
    min-height: 100vh;
    background-color: var(--color-bg-dark);
    padding: 8rem 2rem 4rem 2rem;
}

/* Add Player Section */
.add-player-section {
    text-align: center;
    margin-bottom: 2rem;
}

.btn-icon {
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 0.3rem;
}

.calculator-container {
    max-width: 1500px;
    margin: 0 auto;
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--color-gold);
}

.calculator-description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.calculator-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Players Grid */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, max-content));
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.player-card {
    background: var(--color-bg-section);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    max-width: 600px;
}

.player-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.player-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-gold);
    margin: 0;
}

.player-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.btn-remove {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.course-info-section {
    background: rgba(242, 213, 149, 0.05);
    border: 1px solid rgba(242, 213, 149, 0.15);
    border-radius: 6px;
    padding: 0.8rem;
    margin-bottom: 1rem;
}

.course-info-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 500;
}

/* Input Groups */
.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--color-text);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-teal);
    background: rgba(255, 255, 255, 0.08);
}

.input-group input::placeholder {
    color: rgba(168, 181, 176, 0.5);
}

/* Result Box */
.result-box {
    background: linear-gradient(135deg, rgba(42, 93, 82, 0.3) 0%, rgba(42, 93, 82, 0.15) 100%);
    border: 1px solid rgba(242, 213, 149, 0.2);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: center;
}

.result-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.3rem;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-gold);
    font-family: 'Playfair Display', serif;
}

/* Team Section */
.team-section {
    max-width: 400px;
    margin: 0 auto 2rem auto;
}

.team-card {
    background: var(--color-bg-section);
    border: 2px solid var(--color-teal);
    border-radius: 8px;
    padding: 1.5rem;
}

.team-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-gold);
    margin-bottom: 1rem;
    text-align: center;
}

.team-result {
    background: linear-gradient(135deg, rgba(42, 93, 82, 0.5) 0%, rgba(42, 93, 82, 0.25) 100%);
    border: 2px solid var(--color-gold);
    margin-top: 1rem;
}

.team-result .result-value {
    font-size: 2.2rem;
}

/* Button Group */
.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Formula Box */
.formula-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.formula-box h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.formula-box p {
    color: var(--color-text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.formula-box ul {
    list-style: none;
    padding-left: 0;
}

.formula-box li {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.formula-box li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-teal);
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-section {
        padding: 6rem 1rem 3rem 1rem;
    }

    .calculator-header h1 {
        font-size: 2rem;
    }

    .players-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn {
        width: 100%;
    }

    .formula-box {
        padding: 1.5rem;
    }
}

/* Input validation states */
.input-group input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.input-group input.success {
    border-color: var(--color-teal);
}

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

.player-card {
    animation: fadeIn 0.5s ease-out;
}

.player-card:nth-child(1) { animation-delay: 0.1s; }
.player-card:nth-child(2) { animation-delay: 0.2s; }
.player-card:nth-child(3) { animation-delay: 0.3s; }
.player-card:nth-child(4) { animation-delay: 0.4s; }

.result-value {
    transition: all 0.3s ease;
}

.result-value.updated {
    transform: scale(1.05);
}

/* Debug Info Styles */
.debug-info {
    margin-top: 1.5rem;
}

.debug-info details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
}

.debug-info summary {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 500;
    user-select: none;
    transition: color 0.2s ease;
}

.debug-info summary:hover {
    color: var(--color-text);
}

.debug-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.debug-player,
.debug-team {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.debug-player h4,
.debug-team h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-gold);
    margin: 0 0 0.75rem 0;
}

.debug-info table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.debug-info table td {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.debug-info table td:first-child {
    color: var(--color-text-muted);
    padding-right: 1rem;
}

.debug-info table td:last-child {
    color: var(--color-text);
    text-align: right;
    font-family: 'Courier New', monospace;
}

.debug-info table tr:last-child td {
    border-bottom: none;
}

.debug-team {
    border-color: rgba(242, 213, 149, 0.2);
    background: rgba(42, 93, 82, 0.1);
}

.debug-team table td:last-child {
    color: var(--color-gold);
}
