* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Auth Styles */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    color: #003098;
    text-align: center;
    margin-bottom: 10px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-weight: normal;
}

/* Token Generator Styles */
.token-generator {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #003098;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #003098;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #002070;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-warning {
    background-color: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-small {
    padding: 5px 10px;
    font-size: 14px;
}

/* Navbar */
.navbar {
    background-color: #003098;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Dashboard */
.dashboard-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    color: #003098;
    margin-bottom: 20px;
}

/* Credentials Grid */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.credential-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.credential-card h3 {
    color: #003098;
    margin-bottom: 10px;
}

.credential-card .page-id {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.credential-card .status {
    margin-bottom: 10px;
}

.credential-card .active {
    color: #28a745;
    font-weight: bold;
}

.credential-card .inactive {
    color: #dc3545;
    font-weight: bold;
}

.credential-card .expires {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.credential-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.credential-actions .btn {
    width: 100%;
    font-size: 14px;
    padding: 8px 12px;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.credential-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.credential-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.credential-actions .btn-info {
    background-color: #17a2b8;
    color: white;
}

.credential-actions .btn-info:hover {
    background-color: #138496;
}

.no-credentials {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-content h2 {
    color: #003098;
    margin-bottom: 20px;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* Messages */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Utils */
.mb-3 {
    margin-bottom: 1rem;
}

/* Bot Control Section */
.bot-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.running {
    background: #28a745;
    animation: pulse 2s infinite;
}

.status-indicator.stopped {
    background: #dc3545;
}

.status-indicator.loading {
    background: #ffc107;
    animation: pulse 1s infinite;
}

.bot-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bot-buttons .btn {
    font-size: 0.9rem;
    padding: 8px 16px;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.bot-logs {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.bot-logs h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.log-entry {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.log-entry.success {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.log-entry.error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.log-entry.info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.log-timestamp {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
    margin-left: 10px;
}

.log-message {
    flex: 1;
}

.log-details {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

/* Games Section */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

@media (min-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
}

.game-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 200px;
    max-height: 250px;
}

.game-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.game-card.live {
    border-color: #ff4444;
    border-width: 2px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    min-height: 32px;
}

.game-status {
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.game-status.pregame {
    background: #f0f0f0;
    color: #333;
}

.game-status.live {
    background: #ff4444;
    color: #fff;
    animation: pulse 2s infinite;
}

.game-status.final {
    background: #4caf50;
    color: #fff;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

.teams-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex: 1;
}

.team-info {
    text-align: center;
    flex: 1;
}

.team-name {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.team-record {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
    line-height: 1.1;
}

.series-record {
    font-size: 0.8rem;
    color: #FFD700;
    font-weight: bold;
    margin-top: 2px;
    line-height: 1.1;
}

.score-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0066cc;
    text-align: center;
    padding: 0 10px;
    line-height: 1;
}

.game-details {
    border-top: 1px solid #e0e0e0;
    padding-top: 8px;
    margin-top: 8px;
    flex-shrink: 0;
}

.game-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.75rem;
    line-height: 1.2;
}

.game-detail-label {
    color: #666;
}

.game-detail-value {
    font-weight: 500;
    color: #333;
}

.inning-display {
    text-align: center;
    margin-top: 10px;
    font-size: 1rem;
    color: #666;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.no-games {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Post Status Indicator */
.post-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.post-status.posted {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.post-status.not-posted {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.post-status.partial {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.post-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.post-indicator.posted {
    background: #28a745;
}

.post-indicator.not-posted {
    background: #dc3545;
}

.post-indicator.partial {
    background: #ffc107;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #003098;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
}

/* LMP Games Grid - Más grande y centrado */
#lmp-games-container.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin: 30px auto;
    max-width: 1400px;
    justify-items: center;
}

@media (min-width: 1400px) {
    #lmp-games-container.games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #lmp-games-container.games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

#lmp-games-container .game-card {
    width: 100%;
    max-width: 600px;
    min-height: auto;
    max-height: none;
    padding: 20px;
}

#lmp-games-container .game-card .game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#lmp-games-container .game-card .teams-container {
    margin: 20px 0;
}

#lmp-games-container .game-card .score-display {
    font-size: 2em;
    font-weight: bold;
}

#lmp-games-container .game-card .team-name {
    font-size: 1.2em;
    font-weight: bold;
}

#lmp-games-container .game-card .series-record {
    font-size: 0.9em;
    color: #FFD700;
    margin-top: 5px;
}