.tablet-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    display: none;
    z-index: 9999;
    outline: none;
}

.tablet-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 40px;
    padding: 15px;
    box-shadow: 
        0 0 0 2px #333,
        0 0 30px rgba(0,0,0,0.8),
        inset 0 0 10px rgba(0,0,0,0.5);
}

.tablet-screen {
    width: 100%;
    height: 100%;
    background: #0a0a12;
    border-radius: 25px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #e0e0e0;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.7);
    overflow: hidden;
    position: relative;
}

.tablet-bezel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    pointer-events: none;
    box-shadow: 
        inset 0 0 30px rgba(255,255,255,0.05),
        inset 0 0 0 1px rgba(255,255,255,0.1);
}

.home-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
}

.home-button:hover {
    background: rgba(255,255,255,0.4);
}

/* Header Styles */
.tablet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
}

.tablet-title {
    font-weight: 600;
    font-size: 18px;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    font-size: 20px;
}

.tablet-time {
    font-weight: 500;
    font-size: 16px;
}

.tablet-battery {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.battery-level {
    width: 25px;
    height: 12px;
    border: 1px solid #4CAF50;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.battery-level::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    bottom: 2px;
    width: calc(82% - 4px);
    background: #4CAF50;
    border-radius: 1px;
}

/* Tab Navigation */
.tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
}

.tab {
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #aaa;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

.tab:hover:not(.active) {
    color: #ddd;
}

/* Turf Grid */
.turf-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 5px;
}

.turf-item {
    background: linear-gradient(145deg, #1a1a24, #15151e);
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    border: 1px solid #252530;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.turf-item:hover {
    background: linear-gradient(145deg, #252530, #1a1a24);
    border-color: #4CAF50;
    transform: translateY(-2px);
}

.turf-item.selected {
    background: linear-gradient(145deg, #252530, #1a1a24);
    border: 2px solid #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.turf-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #4CAF50;
    font-size: 16px;
}

.turf-status {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

.turf-owned {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.turf-locked {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.turf-camera-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: #4CAF50;
}

/* Footer Styles */
.tablet-footer {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #aaa;
    padding: 8px 0;
}

.connection-status, .gps-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tablet-status {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: #4CAF50;
    padding: 0 10px;
}

.tablet-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.control-btn {
    background: linear-gradient(145deg, #252530, #1a1a24);
    color: #e0e0e0;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid #333;
}

.control-btn:hover {
    background: linear-gradient(145deg, #333340, #252530);
    transform: translateY(-1px);
}

.control-btn:active {
    transform: translateY(0);
}

.power-btn:hover {
    color: #f44336;
}

.refresh-btn:hover {
    color: #4CAF50;
}

.btn-icon {
    font-size: 16px;
}

/* Animations */
@keyframes tabletFadeIn {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.tablet-container.show {
    display: block;
    animation: tabletFadeIn 0.3s ease-out;
}

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

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* Glare effect */
.tablet-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
    border-radius: 25px 25px 0 0;
}

.turf-item.access-denied-animation {
    animation: accessDenied 0.5s ease-in-out;
    border: 2px solid transparent;
}

@keyframes accessDenied {
    0% {
        box-shadow: 0 0 0 rgba(255, 0, 0, 0);
        border-color: rgba(255, 0, 0, 0);
    }
    25% {
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
        border-color: rgba(255, 0, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 0, 0, 0.9);
        border-color: rgba(255, 0, 0, 0.9);
    }
    75% {
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
        border-color: rgba(255, 0, 0, 0.7);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 0, 0, 0);
        border-color: rgba(255, 0, 0, 0);
    }
}

.turf-locked {
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% { color: #ff0000; text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
    50% { color: #ff6666; text-shadow: 0 0 10px rgba(255, 0, 0, 0.8); }
    100% { color: #ff0000; text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
}