.porra-deportiva-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.porra-deportiva-container-wide {
    max-width: 1100px;
}

.porra-deportiva-header h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.porra-deportiva-match {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.porra-deportiva-matchday {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.porra-deportiva-teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.porra-deportiva-team {
    font-weight: bold;
    font-size: 1.2em;
}

.porra-deportiva-vs {
    color: #999;
    font-size: 1em;
}

.porra-deportiva-match-info {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.porra-deportiva-result {
    font-size: 1.5em;
    color: #1a73e8;
    margin: 10px 0;
}

.porra-deportiva-betting-open,
.porra-deportiva-betting-closed {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: bold;
}

.porra-deportiva-betting-open {
    background: #d4edda;
    color: #155724;
}

.porra-deportiva-betting-closed {
    background: #f8d7da;
    color: #721c24;
}

.porra-deportiva-login-msg {
    background: #fff3cd;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.porra-deportiva-form {
    margin-top: 15px;
}

.porra-deportiva-form-wrapper {
    display: table;
    margin: 0 auto;
    width: auto;
}

.porra-deportiva-scores {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.porra-deportiva-score-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.porra-deportiva-score-label span {
    font-size: 0.85em;
    color: #666;
}

.porra-deportiva-input-score {
    width: 60px;
    height: 50px;
    font-size: 1.5em;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 5px;
}

.porra-deportiva-separator {
    font-size: 1.5em;
    font-weight: bold;
    color: #999;
}

.porra-deportiva-scorer {
    margin-bottom: 20px;
    text-align: left;
}

.porra-deportiva-scorer label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.porra-deportiva-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.porra-deportiva-button {
    width: 100%;
    padding: 15px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.porra-deportiva-button:hover {
    background: #1557b0;
}

.porra-deportiva-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.porra-deportiva-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
}

.porra-deportiva-message.success {
    background: #d4edda;
    color: #155724;
}

.porra-deportiva-message.error {
    background: #f8d7da;
    color: #721c24;
}

.porra-deportiva-user-prediction {
    background: #e8f4f8;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.porra-deportiva-points {
    margin-top: 10px;
    font-size: 1.2em;
}

.porra-deportiva-point-detail {
    font-size: 0.8em;
    color: #666;
    margin-left: 5px;
}

.porra-deportiva-mini-ranking {
    margin-top: 30px;
}

.porra-deportiva-mini-ranking h3 {
    text-align: center;
    margin-bottom: 15px;
}

.porra-deportiva-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.porra-deportiva-table th,
.porra-deportiva-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.porra-deportiva-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.porra-deportiva-ranking-table td:nth-child(1),
.porra-deportiva-ranking-table td:nth-child(3),
.porra-deportiva-ranking-table td:nth-child(4),
.porra-deportiva-ranking-table td:nth-child(5),
.porra-deportiva-ranking-table td:nth-child(6) {
    text-align: center;
}

.porra-deportiva-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.porra-deportiva-stat {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.porra-deportiva-stat-label {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}

.porra-deportiva-stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #1a73e8;
}

.porra-deportiva-alert {
    background: #fff3cd;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin: 15px 0;
}

@media (max-width: 768px) {
    .porra-deportiva-container {
        padding: 10px;
    }

    .porra-deportiva-nav {
        flex-wrap: wrap;
        gap: 6px;
        padding: 6px;
    }

    .porra-deportiva-nav-link {
        flex: 1 1 45%;
        padding: 12px 8px;
        font-size: 0.85em;
        letter-spacing: 0;
    }

    .porra-deportiva-nav-link.porra-deportiva-nav-logout {
        flex: 1 1 100%;
        order: 5;
    }

    .porra-deportiva-profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .porra-deportiva-history-table {
        min-width: 700px;
    }

    .porra-deportiva-form-wrapper {
        width: 100%;
        padding: 0 10px;
    }

    .porra-deportiva-scores {
        gap: 10px;
    }

    .porra-deportiva-input-score {
        width: 70px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .porra-deportiva-container {
        padding: 5px;
    }

    .porra-deportiva-nav-link {
        flex: 1 1 100%;
        padding: 10px 8px;
        font-size: 0.8em;
    }

    .porra-deportiva-profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .porra-deportiva-stat {
        padding: 10px;
    }

    .porra-deportiva-stat-value {
        font-size: 1.3em;
    }

    .porra-deportiva-history-table {
        min-width: 600px;
        font-size: 0.85em;
    }

    .porra-deportiva-history-table th,
    .porra-deportiva-history-table td {
        padding: 8px 6px;
    }

    .porra-deportiva-input-score {
        width: 55px;
        height: 42px;
        font-size: 1.2em;
    }

    .porra-deportiva-separator {
        font-size: 1.2em;
    }

    .porra-deportiva-scorer label {
        font-size: 0.9em;
    }

    .porra-deportiva-select {
        font-size: 0.95em;
        padding: 8px;
    }

    .porra-deportiva-button {
        padding: 12px;
        font-size: 1em;
    }

    .porra-deportiva-login-required {
        padding: 40px 15px;
    }

    .porra-deportiva-login-required h3 {
        font-size: 1.4em;
    }

    .porra-deportiva-login-button {
        padding: 12px 30px;
        font-size: 1em;
    }
}

/* Profile wide layout */
.porra-deportiva-container-wide {
    max-width: 1100px;
}

.porra-deportiva-history-wrapper {
    margin-bottom: 15px;
}

.porra-deportiva-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
}

.porra-deportiva-table-wrapper:focus {
    outline: 2px solid #1a73e8;
    outline-offset: 3px;
}

.porra-deportiva-results-table {
    min-width: 720px;
}

.porra-deportiva-ranking-table {
    min-width: 620px;
}

.porra-deportiva-history-table {
    min-width: 800px;
    font-size: 0.95em;
}

.porra-deportiva-history-table th,
.porra-deportiva-history-table td {
    padding: 12px 10px;
    white-space: nowrap;
}

.porra-deportiva-hit {
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

/* Profile stats - ensure 5 items fit */
.porra-deportiva-profile-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .porra-deportiva-table-wrapper {
        margin-left: -5px;
        margin-right: -5px;
        width: calc(100% + 10px);
    }

    .porra-deportiva-results-table {
        min-width: 680px;
    }

    .porra-deportiva-ranking-table {
        min-width: 580px;
    }

    .porra-deportiva-profile-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .porra-deportiva-history-table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .porra-deportiva-results-table {
        min-width: 650px;
    }

    .porra-deportiva-ranking-table {
        min-width: 550px;
    }

    .porra-deportiva-profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Navigation Bar */
.porra-deportiva-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: #ffffff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
}

.porra-deportiva-nav-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    text-align: center;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 1.1em;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.porra-deportiva-nav-link:hover {
    background: #f5f5f5;
    color: #1a73e8;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.porra-deportiva-nav-link.porra-deportiva-nav-active {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.porra-deportiva-nav-link.porra-deportiva-nav-active:hover {
    background: linear-gradient(135deg, #1557b0 0%, #0d47a1 100%);
    color: white;
    transform: translateY(-2px);
}

/* Logout Button */
.porra-deportiva-nav-link.porra-deportiva-nav-logout {
    background: #f8f9fa;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.porra-deportiva-nav-link.porra-deportiva-nav-logout:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Compact, scrollable navigation */
.porra-deportiva-nav {
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 6px;
}

.porra-deportiva-nav-link {
    min-height: 38px;
    padding: 9px 13px;
    font-size: 0.86em;
    letter-spacing: 0.2px;
}

.porra-deportiva-nav-link.porra-deportiva-nav-logout {
    flex: 0 0 auto;
    border-width: 1px;
}

@media (max-width: 768px) {
    .porra-deportiva-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .porra-deportiva-nav::-webkit-scrollbar {
        display: none;
    }

    .porra-deportiva-nav-link,
    .porra-deportiva-nav-link.porra-deportiva-nav-logout {
        flex: 0 0 auto;
        min-height: 36px;
        padding: 8px 11px;
        font-size: 0.8em;
        white-space: nowrap;
    }
}

/* Login Required Screen */
.porra-deportiva-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    margin-top: 20px;
}

.porra-deportiva-login-icon {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
}

.porra-deportiva-login-required h3 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.porra-deportiva-login-required p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.porra-deportiva-login-button {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.porra-deportiva-login-button:hover {
    background: linear-gradient(135deg, #1557b0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.4);
    color: white;
}

/* Login Form */
.porra-deportiva-login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

.porra-deportiva-login-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.porra-deportiva-login-box .porra-deportiva-login-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.porra-deportiva-login-box h2 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.8em;
}

.porra-deportiva-login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.porra-deportiva-login-form {
    text-align: left;
}

.porra-deportiva-form-group {
    margin-bottom: 20px;
}

.porra-deportiva-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

.porra-deportiva-form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.porra-deportiva-form-control:focus {
    outline: none;
    border-color: #1a73e8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.porra-deportiva-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.85em;
    flex-wrap: wrap;
    gap: 10px;
}

.porra-deportiva-remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #666;
}

.porra-deportiva-remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1a73e8;
}

.porra-deportiva-forgot-password {
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.2s;
}

.porra-deportiva-forgot-password:hover {
    color: #1557b0;
    text-decoration: underline;
}

.porra-deportiva-login-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    font-size: 1.1em;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.porra-deportiva-login-submit:hover {
    background: linear-gradient(135deg, #1557b0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.4);
}

.porra-deportiva-login-footer {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.porra-deportiva-login-footer a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
}

.porra-deportiva-login-footer a:hover {
    text-decoration: underline;
}

/* Confirmation Box */
.porra-deportiva-confirmation-box {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 30px 20px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.porra-deportiva-confirmation-header {
    margin-bottom: 20px;
}

.porra-deportiva-confirmation-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    font-size: 28px;
    line-height: 50px;
    margin-bottom: 10px;
}

.porra-deportiva-confirmation-header h3 {
    color: #155724;
    margin: 0;
    font-size: 1.3em;
}

.porra-deportiva-confirmation-match {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.porra-deportiva-confirmation-match .porra-deportiva-team-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.porra-deportiva-confirmation-match .porra-deportiva-score {
    font-size: 2em;
    font-weight: bold;
    color: #1a73e8;
}

.porra-deportiva-confirmation-match .porra-deportiva-separator {
    font-size: 1.5em;
    color: #666;
}

.porra-deportiva-confirmation-scorer {
    color: #155724;
    font-size: 1em;
    margin: 15px 0 10px;
}

.porra-deportiva-confirmation-info {
    color: #155724;
    font-size: 0.9em;
    margin: 10px 0 20px;
    font-style: italic;
    opacity: 0.9;
}

.porra-deportiva-button-outline {
    background: transparent !important;
    color: #28a745 !important;
    border: 2px solid #28a745 !important;
    margin-top: 10px;
}

.porra-deportiva-button-outline:hover {
    background: #28a745 !important;
    color: white !important;
}

@media (max-width: 480px) {
    .porra-deportiva-login-box {
        padding: 25px 20px;
    }

    .porra-deportiva-login-box h2 {
        font-size: 1.5em;
    }

    .porra-deportiva-form-control {
        padding: 12px 14px;
    }

    .porra-deportiva-login-submit {
        padding: 14px;
    }
}
