/**
 * AM Tennis - Match Analysis
 */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8500ff;
    --secondary: #dedcde;
    --accent: #f9f904;
    --text: #313131;
    --text2: #00072D;
    --primary-hover: #6a00cc;
    --secondary-hover: #c5c3c5;
    --white: #ffffff;
    --light-gray: #f5f5f7;
    --danger: #ff3b30;
    --danger-hover: #dc3545;
    --success: #34c759;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.25s ease-in-out;
}

html, body {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--light-gray);
    height: 100%;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Layout Containers */
.container,
.app-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex-grow: 1;
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-container {
    max-width: auto;
    margin: 2rem auto;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Header Styles */
.app-header {
    background-color: var(--primary);
    color: var(--white);
    padding: 1rem 0;
    width: 100%;
    z-index: 1000;
    position: relative;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-text {
    color: var(--white);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links li a {
    color: var(--white);
    padding: 0.5rem 0;
    position: relative;
    font-weight: 500;
}

.nav-links li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--accent);
}

.nav-links li a:hover:after {
    width: 100%;
}

/* Footer Styles */
.app-footer {
    background-color: #00072D !important;
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-branding {
    flex: 1;
    min-width: 250px;
    margin-bottom: 2rem;
}

.footer-tagline {
    color: var(--secondary);
    margin-top: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    flex: 2;
}

.footer-links-column {
    flex: 1;
    min-width: 150px;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.footer-links-column h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: underline;
}

.footer-links-column ul {
    list-style: none;
}

.footer-links-column ul li {
    margin-bottom: 0.5rem;
}

.footer-links-column ul li a {
    color: white;
    transition: var(--transition);
}

.footer-links-column ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    margin: 1.5rem auto 0;
}

.copyright p {
    font-size: 0.85rem;
    color: white;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-sm {
    background-color: #ffffff;
    text-align: center;
    display: inline-block;
} 

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-success,
.outcome-buttons .btn-success,
a.btn-success {
    background-color: #3AAC68;
    border-color: #3AAC68;
    color: var(--white) !important;
}

.btn-success:hover,
.outcome-buttons .btn-success:hover,
a.btn-success:hover {
    background-color: #339d5d;
    border-color: #339d5d;
    color: var(--white) !important;
}

.btn-warning,
.outcome-buttons .btn-warning,
a.btn-warning {
    background-color: #f9f904;
    border-color: #f9f904;
    color: var(--text) !important;
}

.btn-warning:hover,
.outcome-buttons .btn-warning:hover,
a.btn-warning:hover {
    background-color: #e0e004;
    border-color: #e0e004;
    color: var(--text) !important;
}

.btn-danger,
.outcome-buttons .btn-danger,
a.btn-danger {
    background-color: #E05D5D;
    border-color: #E05D5D;
    color: var(--white) !important;
}

.btn-danger:hover,
.outcome-buttons .btn-danger:hover,
a.btn-danger:hover {
    background-color: #d45454;
    border-color: #d45454;
    color: var(--white) !important;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Outfit', sans-serif;
    border: 1px solid var(--secondary);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(133, 0, 255, 0.1);
}

.has-error .form-control {
    border-color: var(--danger);
}

.error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.form-links {
    margin-top: 1.5rem;
    text-align: center;
}

.form-links p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

/* Card and Content Containers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.page-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.match-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.match-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--secondary);
}

.match-header h3 {
    color: var(--text);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.match-date {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.85rem;
}

.match-info {
    padding: 1.25rem 1.5rem;
}

.match-type {
    display: inline-block;
    background-color: var(--light-gray);
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

.match-actions {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--secondary);
}

/* Dashboard Styles */
.matches-container {
    width: 100%;
}

.matches-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.match-status {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.match-status.in-progress {
    background-color: rgba(255, 164, 0, 0.2);
    color: #ff9500;
    border: 1px solid rgba(255, 164, 0, 0.3);
}

.match-status.paused {
    background-color: rgba(0, 122, 255, 0.2);
    color: #007aff;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.match-status.completed {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--success);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.no-matches {
    background-color: var(--white);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.no-matches p {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.1rem;
}

/* Match Setup Page */
.setup-header {
    margin-bottom: 2rem;
    text-align: center;
}

.setup-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.setup-content {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.setup-form {
    width: 100%;
}

/* Alert Messages */
.success-message,
.error-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 500;
}

.success-message {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--success);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.error-message {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

/* Match View Page */
.match-view-container {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.match-header {
    margin-bottom: 1.5rem;
}

.match-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.match-score-summary {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.set-scores {
    display: flex;
    gap: 1rem;
}

.set-score {
    background-color: var(--light-gray);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.set-score span {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0.25rem 0;
}

/* Statistics Styles */
.statistics-container {
    margin-bottom: 2rem;
}

.stat-section {
    margin-bottom: 2rem;
}

.stat-section h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--secondary);
    font-size: 1.1rem;
    color: var(--primary);
}

.stat-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    opacity: 0.7;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label-org {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: white;
    opacity: 0.7;
}

.stat-value-org {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.stat-table {
    overflow-x: auto;
}

.stat-table table {
    width: 100%;
    border-collapse: collapse;
}

.stat-table th,
.stat-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--secondary);
}

.stat-table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--text);
}

/* Stat Bars */
.stat-with-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.stat-number {
    min-width: 2.5rem;
    font-weight: 500;
}

.stat-bar-container {
    flex-grow: 1;
    height: 8px;
    background-color: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    background-color: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.stat-bar-negative {
    background-color: var(--danger);
}

.stat-bar-neutral {
    background-color: var(--secondary);
}

/* Delete Confirmation */
.delete-match-container {
    max-width: 600px;
    margin: 0 auto;
}

.confirmation-box {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.confirmation-box h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.25rem;
}

.match-info {
    background-color: var(--light-gray);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.match-info p {
    margin: 0.5rem 0;
}

.warning-message {
    background-color: rgba(255, 59, 48, 0.1);
    border-left: 4px solid var(--danger);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--danger);
}

.confirmation-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Spaziatura per i pulsanti in view-actions su mobile */
@media (max-width: 768px) {
  .view-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .view-actions .btn {
    width: 100%;
    margin: 0;
  }
}

/* Menu and Dropdown */
.user-menu {
    display: flex;
    align-items: center;
}

.username {
    margin-right: 1rem;
    font-weight: 500;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    overflow: hidden;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-icon {
    font-size: 0.75rem;
    transition: transform 0.2s;
    margin-left: 0.25rem;
}

.dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 100;
    display: none;
    margin-top: 0.5rem;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--secondary);
    margin: 0.5rem 0;
}
/* Organization Users Management styles */
.org-dashboard {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.org-info {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #6a11cb 100%);
    color: white;
}

.org-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.org-stats {
    display: flex;
    gap: 2rem;
}

.stat-box {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.org-users-section, 
.org-info-section {
    padding: 2rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.section-header p {
    color: #666;
}

.add-user-form {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.input-with-button {
    display: flex;
    gap: 1rem;
}

.input-with-button .form-control {
    flex: 1;
}

.form-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.form-info i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.users-table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--secondary);
}

.users-table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--text);
}

.inline-form {
    display: inline;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.no-users {
    padding: 3rem;
    text-align: center;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.info-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: 8px;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.info-icon {
    font-size: 2rem;
    color: var(--primary);
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.info-content p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .org-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .input-with-button {
        flex-direction: column;
    }
    
    .info-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .info-icon {
        width: auto;
    }
    
    .public-nav,
    .user-menu .username {
        display: none;
    }
    
    .match-card {
        max-width: 100%;
    }
    
    .stat-section {
        padding: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-branding {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .footer-links {
        justify-content: space-around;
    }
    
    .setup-content {
        padding: 1.5rem;
    }
    
    .stat-with-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .stat-bar-container {
        width: 100%;
    }
}

/* Contact Page Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-info-section, .contact-form-section {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-card {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.contact-card p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.contact-link {
    margin-top: auto;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary-hover);
}

.social-section {
    margin-top: 2rem;
}

.social-section h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background-color: var(--light-gray);
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    color: var(--text);
}

.social-link i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.contact-form-section h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.contact-form-section p {
    color: #666;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--secondary);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(133, 0, 255, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.privacy-consent {
    display: flex;
    align-items: flex-start;
}

.privacy-consent input[type="checkbox"] {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
}

.privacy-consent label {
    font-weight: normal;
    margin-bottom: 0;
}

.faq-section {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 3rem;
}

.faq-section h3 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 2rem;
    text-align: center;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--secondary);
    margin-bottom: 1rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    cursor: pointer;
}

.faq-question h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.faq-toggle {
    color: var(--primary);
    transition: var(--transition);
}

.faq-item.active .faq-toggle i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 0 1.5rem;
    color: #666;
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.map-section {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 3rem;
}

.map-section h3 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 2rem;
    text-align: center;
}

.map-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 400px;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.map-overlay p {
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .contact-cards, .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .social-link {
        width: 100%;
        justify-content: center;
    }
    
    .map-overlay {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }

    .view-actions a {
        margin-bottom: 20px;
    }
}

/* About Page Styles */
.about-container {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.about-section, .features-section, .creator-section, .how-it-works, .testimonials-section, .contact-section {
    padding: 2rem;
    border-bottom: 1px solid var(--secondary);
}

.about-section:last-child, .contact-section {
    border-bottom: none;
}

.about-header {
    text-align: center;
    margin-bottom: 2rem;
}

.about-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.2rem;
    color: #666;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.features-section h3, .creator-section h3, .how-it-works h3, .testimonials-section h3, .contact-section h3 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 2rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.feature-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
    text-align: center;
}

.feature-card p {
    color: #666;
    line-height: 1.5;
}

.creator-profile {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background-color: var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
}

.creator-image {
    flex: 1;
    max-width: 300px;
}

.profile-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.profile-info {
    font-family: 'Outfit', sans-serif;

}

.creator-info {
    flex: 2;
}

.creator-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.creator-title {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.creator-info p {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background-color: var(--white);
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    color: var(--text);
}

.social-link i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background-color: var(--primary);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.step-content p {
    color: #666;
    line-height: 1.5;
}

.testimonials-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
    height: 100%;
}

.testimonial-content {
    font-style: italic;
    position: relative;
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    position: relative;
    z-index: 1;
}

.testimonial-content:before {
    content: '"';
    font-family: Georgia, serif;
    font-size: 5rem;
    position: absolute;
    top: -2rem;
    left: -1rem;
    color: rgba(0, 0, 0, 0.1);
    z-index: 0;
}

.testimonial-author {
    text-align: right;
}

.contact-info {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--primary);
    font-size: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .creator-profile {
        flex-direction: column;
    }
    
    .creator-image {
        max-width: 100%;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .features-grid, .testimonials-container {
        grid-template-columns: 1fr;
    }
    
    .contact-details {
        flex-direction: column;
        align-items: center;
    }
}

/* Mobile Navigation */
.mobile-nav,
.mobile-public-nav {
    display: none;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    padding: 5px;
    cursor: pointer;
    position: relative;
}

.menu-icon {
    display: block;
    position: relative;
    width: 100%;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

.menu-icon:before,
.menu-icon:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

.menu-icon:before {
    top: -8px;
}

.menu-icon:after {
    bottom: -8px;
}

.mobile-menu-toggle.active .menu-icon {
    background-color: transparent;
}

.mobile-menu-toggle.active .menu-icon:before {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .menu-icon:after {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary);
    z-index: 100;
    padding: 1rem;
}

.mobile-nav.open .mobile-menu,
.mobile-public-nav.open .mobile-menu {
    display: block;
}

.menu-items {
    list-style: none;
}

.menu-items li {
    margin-bottom: 0.5rem;
}

.menu-items li a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
}

.menu-items li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.75rem;
}

.mt-2 {
    margin-top: 1.5rem;
}

.w-100 {
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .header-content {
        padding: 0 1.5rem;
    }
    
    .app-content {
        padding: 1.5rem;
    }
    
    .match-view-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .public-nav,
    .user-menu .username {
        display: none;
    }
    
    .mobile-nav,
    .mobile-public-nav {
        display: block;
    }
    
    .match-card {
        max-width: 100%;
    }
    
    .stat-section {
        padding: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-branding {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .footer-links {
        justify-content: space-around;
    }
    
    .setup-content {
        padding: 1.5rem;
    }
    
    .stat-with-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .stat-bar-container {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .app-content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .match-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    /* Fix per problema header su schermi molto piccoli */
    .user-menu .dropdown-toggle {
        padding-right: 0;
    }
    
    .dropdown-icon {
        display: none;
    }
}

/* Per dispositivi molto piccoli, nascondiamo l'avatar utente */
@media (max-width: 360px) {
    .user-avatar {
        display: none;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-hover);
}

/* Stile per il link all'area amministrativa */
.admin-link {
    background-color: rgba(133, 0, 255, 0.1);
    color: var(--primary) !important;
    font-weight: bold;
}

.admin-link:hover {
    background-color: rgba(133, 0, 255, 0.2);
}

/* Allineamento per desktop - logo a sinistra, utente a destra */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Allineamento per mobile - menu a sinistra, logo al centro, utente a destra */
@media (max-width: 768px) {
    .header-content {
        display: grid;
        grid-template-columns: 2fr 1fr;
        align-items: left;
    }
    
    .branding {
        grid-column: 1;
        justify-self: left;
        text-align: left;
    }
    
    .user-menu {
        grid-column: 2;
        justify-self: end;
    }
}

/* Tennis Score Display */
.has-advantage {
    color: var(--primary);
    font-weight: 700;
    position: relative;
}

.has-advantage:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
}

/* Point Section Scrolling */
#point-section {
    scroll-margin-top: 80px; /* Spazio extra per evitare che l'header fisso nasconda il contenuto */
    padding-top: 15px;
}

/* Scoreboard Section Scrolling */
#scoreboard-section {
    scroll-margin-top: 80px; /* Spazio extra per evitare che l'header fisso nasconda il contenuto */
    padding-top: 15px;
}

/* Shot Type Section Scrolling */
#shot-type-section {
    scroll-margin-top: 80px; /* Spazio extra per evitare che l'header fisso nasconda il contenuto */
    padding-top: 15px;
}

@media (max-width: 768px) {
    #point-section {
        scroll-margin-top: 60px;
    }
    
    #scoreboard-section {
        scroll-margin-top: 60px;
    }
    
    #shot-type-section {
        scroll-margin-top: 60px;
    }
}