/* ==========================================================================
   ROU.ISPORTS // SOCCER CALCULATORS & PERFORMANCE TOOLS STYLES
   ========================================================================== */

/* Subpage Hero & Header Adjustments */
.tools-hero {
    position: relative;
    padding: 120px 5% 60px;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(circle at 50% 30%, rgba(0, 196, 106, 0.08) 0%, transparent 70%);
}

.tools-hero .tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 196, 106, 0.1);
    border: 1px solid rgba(0, 196, 106, 0.3);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.tools-hero .tagline svg {
    width: 14px;
    height: 14px;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 6px var(--primary)); }
}

.tools-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 1.1;
    margin-bottom: 18px;
}

.tools-hero p {
    max-width: 720px;
    margin: 0 auto 30px;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Category Filters Bar */
.tools-filter-wrapper {
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 5%;
}

.tools-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 16px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 10px 22px;
    border-radius: 30px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn.active {
    background: var(--primary);
    color: #050505;
    font-weight: 700;
    box-shadow: 0 0 18px var(--primary-glow);
    border-color: var(--primary);
}

.filter-btn .count-badge {
    background: rgba(0, 0, 0, 0.3);
    color: inherit;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
}

/* Tools Grid Container */
.tools-section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5% 100px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
}

/* Individual Tool Card */
.tool-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 196, 106, 0.4);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 196, 106, 0.15);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.tool-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: rgba(0, 196, 106, 0.08);
    border: 1px solid rgba(0, 196, 106, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: var(--transition);
}

.tool-card:hover .tool-icon-box {
    background: var(--primary);
    color: #050505;
    box-shadow: 0 0 15px var(--primary-glow);
}

.tool-icon-box svg {
    width: 26px;
    height: 26px;
}

.tool-category-badge {
    font-size: 0.72rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-title {
    font-size: 1.55rem;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.25;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.tool-tag {
    font-size: 0.7rem;
    background: rgba(0, 196, 106, 0.06);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 196, 106, 0.15);
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-cta-btn {
    background: transparent;
    border: 1px solid rgba(0, 196, 106, 0.4);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.88rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.tool-card:hover .tool-cta-btn {
    background: var(--primary);
    color: #050505;
    font-weight: 700;
    box-shadow: 0 0 16px var(--primary-glow);
    border-color: var(--primary);
}

.tool-cta-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-cta-btn svg {
    transform: translateX(4px);
}

/* ==========================================================================
   INTERACTIVE CALCULATOR MODAL / DRAWER
   ========================================================================== */
.calc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.calc-modal.active {
    display: flex;
    opacity: 1;
}

.calc-modal-content {
    background: #111111;
    border: 1px solid rgba(0, 196, 106, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 196, 106, 0.15);
    border-radius: 16px;
    width: 100%;
    max-width: 950px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 35px 40px;
    color: var(--text-color);
}

.close-calc-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-calc-modal:hover {
    background: var(--primary);
    color: #050505;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: rotate(90deg);
}

.calc-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.calc-header .badge {
    display: inline-block;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.calc-header h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 8px;
}

.calc-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Calculator Grid: Inputs vs Results */
.calc-body-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
}

@media (max-width: 820px) {
    .calc-body-grid {
        grid-template-columns: 1fr;
    }
}

/* Input Fields & Groups */
.calc-input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-field-group label {
    font-size: 0.85rem;
    color: #ccc;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
}

.input-field-group label span.unit {
    color: var(--primary);
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.5px;
}

.calc-input, .calc-select {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.calc-input:focus, .calc-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: rgba(0, 196, 106, 0.03);
}

.calc-slider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calc-range-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #252525;
    border-radius: 3px;
    outline: none;
}

.calc-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: transform 0.2s;
}

.calc-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-val-box {
    min-width: 48px;
    text-align: right;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
}

/* Results Box */
.calc-result-section {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 196, 106, 0.25);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.calc-result-section::before {
    content: 'ROU.ISPORTS METRICS';
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 0.65rem;
    font-family: 'Oswald', sans-serif;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: 1px;
}

.result-main-metric {
    text-align: center;
    padding: 20px 0 15px;
}

.result-metric-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.result-metric-value {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 20px var(--primary-glow);
}

.result-metric-value span.metric-sub {
    font-size: 1.2rem;
    color: var(--primary);
    margin-left: 4px;
}

.result-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 12px;
}

.badge-elite {
    background: rgba(0, 196, 106, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.badge-good {
    background: rgba(33, 150, 243, 0.15);
    color: #42a5f5;
    border: 1px solid #42a5f5;
}

.badge-average {
    background: rgba(255, 193, 7, 0.15);
    color: #ffca28;
    border: 1px solid #ffca28;
}

.badge-warning {
    background: rgba(255, 87, 34, 0.15);
    color: #ff7043;
    border: 1px solid #ff7043;
}

/* Secondary Metrics Grid */
.result-stats-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0;
}

.substat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 10px;
}

.substat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.substat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.35rem;
    color: #fff;
    font-weight: 600;
}

/* Benchmark Progress Bar */
.benchmark-track {
    margin: 15px 0 20px;
}

.benchmark-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-family: 'Roboto', sans-serif;
}

.benchmark-bar-bg {
    width: 100%;
    height: 8px;
    background: #222;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.benchmark-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffca28, #42a5f5, var(--primary));
    width: 0%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Insights / Recommendations Box */
.calc-insight-card {
    background: rgba(0, 196, 106, 0.05);
    border-left: 3px solid var(--primary);
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    margin-top: 15px;
}

.calc-insight-card h5 {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calc-insight-card p {
    font-size: 0.82rem;
    color: #ccc;
    line-height: 1.45;
}

/* Action Controls (Reset, Share/Copy) */
.calc-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

/* Nav highlight badge for Calculatoare Fotbal */
.nav-tools-badge {
    position: relative;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.nav-tools-badge::before {
    content: 'PRO';
    position: absolute;
    top: -10px;
    right: -16px;
    background: var(--primary);
    color: #000;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* Responsive details */
@media (max-width: 600px) {
    .calc-modal-content {
        padding: 25px 20px;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }

    .result-metric-value {
        font-size: 2.8rem;
    }

    .tools-filter-bar {
        border-radius: 20px;
    }
}
