/* Players Page - Table-based System */

/* Page Header */
.page-header {
    padding: 120px 0 80px;
    position: relative;
    background: radial-gradient(ellipse at center, var(--dark-purple), var(--bg-primary));
    overflow: hidden;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--dark-purple), var(--bg-primary));
}

.header-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.page-title {
    font-family: var(--font-primary);
    font-size: 4rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.page-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* User Status */
.user-status {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(107, 70, 193, 0.3);
}

.status-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Players Section */
.players-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

/* Admin Controls */
.admin-controls {
    text-align: right;
    margin-bottom: 3rem;
}

.add-player-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(45deg, #16a34a, #15803d);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.add-player-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(22, 163, 74, 0.5);
}

/* Players Table */
.players-table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.players-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Poppins', sans-serif;
}

.players-table thead th {
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    color: #ffffff;
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.players-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.players-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(5px);
}

.players-table td {
    padding: 20px 15px;
    color: rgba(255, 255, 255, 0.9);
    vertical-align: middle;
}

.players-table td:first-child {
    text-align: center;
    padding: 15px;
}

.player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(59, 130, 246, 0.6);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2px;
    display: block;
    margin: 0 auto;
}

.player-avatar:hover {
    transform: scale(1.15);
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

/* Ensure circular shape even if image fails to load */
.player-avatar:not([src]),
.player-avatar[src=""],
.player-avatar[src*="data:"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 20px;
}

.player-name {
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #3b82f6, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.player-ign {
    color: #60a5fa;
    font-weight: 500;
}

.player-id {
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.role-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(45deg, #3b82f6, #9333ea);
    color: white;
}

.role-badge.captain,
.role-badge.captain-igl {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.role-badge.igl {
    background: linear-gradient(45deg, #ef4444, #dc2626);
}

.role-badge.fragger {
    background: linear-gradient(45deg, #8b5cf6, #7c3aed);
}

.role-badge.support {
    background: linear-gradient(45deg, #10b981, #059669);
}

.role-badge.sniper {
    background: linear-gradient(45deg, #06b6d4, #0891b2);
}

.role-badge.assaulter {
    background: linear-gradient(45deg, #f97316, #ea580c);
}

.edit-btn, .delete-btn {
    background: linear-gradient(45deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.delete-btn {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
}

.edit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.delete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.no-action {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, #1a1b3e, #2a2d5f);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: #ffffff;
    margin: 0;
    background: linear-gradient(45deg, #3b82f6, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Edit Form */
.edit-form {
    padding: 2rem;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 1rem;
    border: none;
}

.form-group select option:hover,
.form-group select option:checked {
    background: var(--primary-purple);
    color: #FFFFFF;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Form Hint */
.form-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
    opacity: 0.8;
}

/* Avatar Input with Preview */
.avatar-input-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.avatar-input-container input {
    flex: 1;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(107, 70, 193, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    position: relative;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem;
}

.preview-placeholder i {
    font-size: 1.5rem;
    opacity: 0.6;
}

.preview-placeholder span {
    font-size: 0.7rem;
    line-height: 1.2;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 70, 193, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(107, 70, 193, 0.3);
}

.btn-secondary:hover {
    background: rgba(107, 70, 193, 0.1);
    color: var(--text-primary);
    border-color: var(--primary-purple);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Login Prompt */
.login-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 20px;
}

.login-prompt-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 50px 40px;
    backdrop-filter: blur(10px);
    max-width: 500px;
    width: 100%;
}

.login-icon {
    font-size: 4rem;
    color: rgba(59, 130, 246, 0.6);
    margin-bottom: 20px;
}

.login-prompt h3 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.login-prompt p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.login-prompt-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, #3b82f6, #9333ea);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.login-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    text-decoration: none;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Public View - No Actions Column */
.players-table.public-view thead th:last-child,
.players-table.public-view tbody td:last-child {
    display: none;
}

/* Public View Message */
.public-view-message {
    text-align: center;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.public-view-message i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    color: #60a5fa;
}

.public-view-message .login-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
}

.public-view-message .login-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

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

    .player-card {
        padding: 1.5rem;
    }

    .player-stats {
        flex-direction: column;
        gap: 0.8rem;
    }

    .stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(107, 70, 193, 0.1);
    }

    .stat:last-child {
        border-bottom: none;
    }

    .stat-label {
        margin-bottom: 0;
        text-align: left;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .edit-form {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .user-status {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .player-actions {
        position: static;
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 100px 0 60px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .player-image img {
        width: 100px;
        height: 100px;
    }

    .player-name {
        font-size: 1.3rem;
    }

    .add-player-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .login-prompt-content {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .login-prompt h3 {
        font-size: 1.5rem;
    }
    
    .login-prompt p {
        font-size: 1rem;
    }
}

/* User Status at Bottom */
.user-status-bottom {
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
}

.user-status-bottom .status-container {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.user-status-bottom .status-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
}

.user-status-bottom .logout-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.user-status-bottom .logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.user-status-bottom .logout-btn i {
    font-size: 0.85rem;
}

/* ===========================
   RESPONSIVE DESIGN - ENHANCED
   =========================== */

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .page-header {
        padding: 100px 0 60px;
    }
    
    .page-title {
        font-size: 3rem;
    }
    
    .players-table th,
    .players-table td {
        padding: 15px 10px;
        font-size: 0.9rem;
    }
    
    .player-avatar {
        width: 50px;
        height: 50px;
    }
}

/* Tablet Portrait & Mobile Landscape (768px and below) */
@media (max-width: 768px) {
    .page-header {
        padding: 90px 20px 50px;
    }
    
    .page-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
        letter-spacing: 1px;
    }

    .page-subtitle {
        font-size: clamp(1rem, 4vw, 1.3rem);
        padding: 0 10px;
    }

    /* Admin Controls - Full Width Button */
    .admin-controls {
        text-align: center;
        margin-bottom: 2rem;
        padding: 0 15px;
    }

    .add-player-btn {
        width: 100%;
        max-width: 400px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        justify-content: center;
    }

    /* Mobile-Optimized Table */
    .players-table-container {
        border-radius: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .players-table {
        min-width: 600px; /* Allow horizontal scroll */
    }

    .players-table thead th {
        padding: 15px 10px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .players-table td {
        padding: 15px 10px;
        font-size: 0.9rem;
    }

    .player-avatar {
        width: 45px;
        height: 45px;
        border-width: 2px;
    }

    .player-name {
        font-size: 1rem;
    }

    .player-ign,
    .player-id {
        font-size: 0.85rem;
    }

    .role-badge {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .edit-btn,
    .delete-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        margin-right: 5px;
    }

    /* Modal Optimization */
    .modal-content {
        width: 95%;
        max-width: 500px;
        margin: 1rem;
        padding: 20px;
        max-height: 85vh;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .edit-form {
        padding: 1rem 0;
    }

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

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
    }

    /* Avatar Preview - Stack Vertically */
    .avatar-input-container {
        flex-direction: column;
        gap: 0.8rem;
    }

    .avatar-preview {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .form-hint {
        font-size: 0.8rem;
    }

    .form-actions {
        flex-direction: row;
        gap: 0.8rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
        flex: 1;
    }

    /* Empty State */
    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.5rem;
    }

    .empty-state p {
        font-size: 0.95rem;
    }

    /* Login Prompt */
    .login-prompt {
        padding: 40px 15px;
        min-height: 350px;
    }

    .login-prompt-content {
        padding: 40px 30px;
        margin: 0 10px;
    }

    .login-icon {
        font-size: 3rem;
    }

    .login-prompt h3 {
        font-size: 1.5rem;
    }

    .login-prompt p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .login-prompt-btn {
        padding: 12px 25px;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* User Status Bottom */
    .user-status-bottom {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }

    .user-status-bottom .status-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1.2rem 1.5rem;
        min-width: unset;
        width: calc(100% - 30px);
        max-width: 400px;
    }

    .user-status-bottom .status-text {
        font-size: 0.95rem;
        text-align: center;
    }

    .user-status-bottom .logout-btn {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1.2rem;
    }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
    .page-header {
        padding: 80px 15px 40px;
    }

    .page-title {
        font-size: 1.8rem;
        letter-spacing: 0.5px;
    }

    .page-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    /* Admin Controls */
    .add-player-btn {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }

    /* Table - More Compact */
    .players-table {
        min-width: 550px;
    }

    .players-table thead th {
        padding: 12px 8px;
        font-size: 0.75rem;
    }

    .players-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }

    .player-avatar {
        width: 40px;
        height: 40px;
    }

    .player-name {
        font-size: 0.95rem;
    }

    .player-ign,
    .player-id {
        font-size: 0.8rem;
    }

    .role-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .edit-btn,
    .delete-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
        margin-right: 4px;
    }

    .no-action {
        font-size: 0.8rem;
    }

    /* Modal - Full Screen on Small Devices */
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 15px;
    }

    .modal-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .close-btn {
        font-size: 1.3rem;
    }

    .edit-form {
        padding: 0.5rem 0;
    }

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

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.65rem 0.8rem;
        font-size: 0.9rem;
    }

    .avatar-preview {
        width: 90px;
        height: 90px;
    }

    .preview-placeholder i {
        font-size: 1.3rem;
    }

    .preview-placeholder span {
        font-size: 0.65rem;
    }

    .form-hint {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .form-actions {
        margin-top: 1.5rem;
        gap: 0.6rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    /* Empty State */
    .empty-state {
        padding: 2.5rem 1rem;
    }

    .empty-state i {
        font-size: 2.5rem;
    }

    .empty-state h3 {
        font-size: 1.3rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }

    /* Login Prompt */
    .login-prompt {
        padding: 30px 10px;
        min-height: 300px;
    }

    .login-prompt-content {
        padding: 30px 20px;
        margin: 0;
    }

    .login-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }

    .login-prompt h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .login-prompt p {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .login-prompt-btn {
        padding: 11px 20px;
        font-size: 0.95rem;
        width: 100%;
    }

    /* User Status Bottom */
    .user-status-bottom {
        margin-top: 1.5rem;
        padding: 1rem 0;
    }

    .user-status-bottom .status-container {
        padding: 1rem 1.2rem;
        width: calc(100% - 20px);
    }

    .user-status-bottom .status-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .user-status-bottom .logout-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .page-title {
        font-size: 1.6rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
    }

    .add-player-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .players-table {
        min-width: 500px;
    }

    .players-table thead th {
        padding: 10px 6px;
        font-size: 0.7rem;
    }

    .players-table td {
        padding: 10px 6px;
        font-size: 0.8rem;
    }

    .player-avatar {
        width: 35px;
        height: 35px;
    }

    .role-badge {
        padding: 3px 6px;
        font-size: 0.65rem;
    }

    .edit-btn,
    .delete-btn {
        padding: 4px 6px;
        font-size: 0.65rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.6rem 0.7rem;
        font-size: 0.85rem;
    }
}

/* Landscape Orientation - Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .page-header {
        padding: 70px 20px 30px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .modal-content {
        max-height: 95vh;
    }

    .login-prompt {
        min-height: auto;
        padding: 20px 15px;
    }

    .login-prompt-content {
        padding: 25px 20px;
    }

    .login-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .login-prompt h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .login-prompt p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .players-table tbody tr:hover,
    .player-avatar:hover,
    .edit-btn:hover,
    .delete-btn:hover,
    .add-player-btn:hover,
    .login-prompt-btn:hover {
        transform: none;
    }

    .players-table tbody tr:hover {
        background: transparent;
    }

    /* Add touch-friendly active states instead */
    .players-table tbody tr:active {
        background: rgba(59, 130, 246, 0.05);
    }

    .edit-btn:active,
    .delete-btn:active {
        transform: scale(0.95);
    }

    .add-player-btn:active {
        transform: scale(0.98);
    }

    .login-prompt-btn:active {
        transform: scale(0.98);
    }

    /* Increase tap targets */
    .edit-btn,
    .delete-btn {
        min-width: 60px;
        min-height: 32px;
    }

    .add-player-btn {
        min-height: 48px;
    }

    .login-prompt-btn {
        min-height: 48px;
    }
}

/* High DPI Displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .player-avatar {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Notification Enhancements for Mobile */
@media (max-width: 768px) {
    .enhanced-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: unset;
        max-width: unset;
    }

    .notification-content {
        padding: 12px 15px;
        font-size: 13px;
    }

    .notification-icon {
        font-size: 20px;
        margin-right: 10px;
    }

    .notification-message {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .enhanced-notification {
        top: 5px;
        right: 5px;
        left: 5px;
    }

    .notification-content {
        padding: 10px 12px;
    }

    .notification-icon {
        font-size: 18px;
        margin-right: 8px;
    }

    .notification-message {
        font-size: 12px;
        line-height: 1.3;
    }

    .notification-close {
        font-size: 14px;
        margin-left: 8px;
    }
}

/* Email Conflict Notification - Mobile */
@media (max-width: 768px) {
    .enhanced-notification.email-conflict {
        min-width: unset;
    }

    .conflict-details {
        font-size: 12px;
        padding: 10px;
        max-height: 150px;
    }

    .notification-header h4 {
        font-size: 14px;
    }
}

/* Loading State - Mobile Friendly */
@media (max-width: 480px) {
    .loading {
        padding: 2rem 1rem;
    }

    .loading i {
        font-size: 1.8rem;
    }
}