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

        body {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
            color: #e0e0e0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            min-height: 100vh;
            overflow-x: hidden;
        }
        /* Greener Background for Safe State */
        body.safe {
            background: linear-gradient(135deg, #0f2310 0%, #163e24 50%, #081a0e 100%);
        }

        /* Redder Background for Alert State */
        body.alert {
            background: linear-gradient(135deg, #2e1a1a 0%, #3e1616 50%, #230f0f 100%);
        }

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

        .header {
            text-align: center;
            margin-bottom: 30px;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .header h1 {
            color: #64ffda;
            font-size: 2.5rem;
            margin-bottom: 10px;
            text-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
        }

        .last-update {
            color: #b0bec5;
            font-size: 1rem;
        }

        /* ── Music Controls ── */
        .music-controls {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            margin-top: 14px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 30px;
            padding: 6px 14px;
        }

        .music-status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #ff6b6b;
            flex-shrink: 0;
            transition: background 0.3s ease;
            box-shadow: 0 0 6px currentColor;
        }

        .music-toggle-btn,
        .music-test-btn {
            background: none;
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #e0e0e0;
            font-family: inherit;
            font-size: 0.85rem;
            padding: 5px 14px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.25s ease;
        }

        .music-toggle-btn:hover,
        .music-test-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.4);
        }

        .music-toggle-btn.active {
            background: rgba(76, 175, 80, 0.2);
            border-color: #4caf50;
            color: #4caf50;
        }

        .music-test-btn {
            border-color: rgba(100, 255, 218, 0.4);
            color: #64ffda;
        }

        .music-test-btn:hover {
            background: rgba(100, 255, 218, 0.1);
            border-color: #64ffda;
        }

        /* ── Grid ── */
        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 20px;
            animation: fadeIn 1s ease-in;
        }

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

        @media (min-width: 768px) and (max-width: 1199px) {
            .grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

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

        .square {
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
            border-radius: 20px;
            padding: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            min-height: 500px;
            box-shadow: 
                0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .square::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(100, 255, 218, 0.05), transparent);
            transform: rotate(45deg);
            animation: shimmer 3s infinite;
        }

        .square:hover {
            transform: translateY(-5px);
            box-shadow: 
                0 15px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        .square-title {
            color: #64ffda;
            font-size: 1.3rem;
            font-weight: bold;
            margin-bottom: 15px;
            text-align: center;
            padding-bottom: 10px;
            border-bottom: 2px solid rgba(100, 255, 218, 0.3);
            position: relative;
            z-index: 1;
        }

        .location-selector {
            display: inline-block;
        }

        .location-display {
            color: inherit;
            cursor: pointer;
            padding: 3px 8px;
            border-radius: 4px;
            transition: background-color 0.3s ease;
            text-decoration: underline;
        }

        .location-display:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .location-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
        }

        .location-modal.active {
            display: flex;
        }

        .location-modal-content {
            background: linear-gradient(145deg, rgba(26, 26, 46, 0.95), rgba(22, 33, 62, 0.95));
            border-radius: 15px;
            padding: 30px;
            width: 90%;
            max-width: 500px;
            max-height: 80vh;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(20px);
            position: relative;
        }

        .location-modal-header {
            text-align: center;
            margin-bottom: 25px;
        }

        .location-modal-title {
            color: #64ffda;
            font-size: 1.5rem;
            font-weight: bold;
            margin-bottom: 10px;
        }

        .location-search {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            color: #e0e0e0;
            padding: 12px 15px;
            font-size: 1rem;
            font-family: inherit;
            outline: none;
            width: 100%;
            margin-bottom: 20px;
        }

        .location-search:focus {
            border-color: #64ffda;
            box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
        }

        .location-list {
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
        }

        .location-item {
            padding: 15px;
            cursor: pointer;
            color: #e0e0e0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .location-item:hover {
            background: rgba(100, 255, 218, 0.15);
            transform: translateX(5px);
        }

        .location-item.selected {
            background: rgba(100, 255, 218, 0.1);
            font-weight: bold;
            color: rgb(100, 255, 218);
        }

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

        .no-results {
            color: #78909c;
            font-style: italic;
            text-align: center;
        }

        .close-modal {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            color: #e0e0e0;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 5px;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.3s ease;
        }

        .close-modal:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .messages {
            list-style: none;
            position: relative;
            z-index: 1;
        }

        .message {
            background: rgba(255, 255, 255, 0.03);
            border-right: 3px solid #64ffda;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 10px;
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .message:hover {
            background: rgba(255, 255, 255, 0.08);
            border-right-color: #ffd54f;
            transform: translateX(-3px);
        }

        .message-content {
            color: #e0e0e0;
            font-size: 0.9rem;
            line-height: 1.4;
            margin-bottom: 5px;
        }

        .message-meta {
            color: #78909c;
            font-size: 0.75rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .loading {
            text-align: center;
            color: #64ffda;
            font-style: italic;
            padding: 20px;
        }

        .error {
            color: #ff6b6b;
            text-align: center;
            padding: 20px;
        }

        .status-indicator {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #4caf50;
            animation: pulse 2s infinite;
            margin-left: 5px;
        }

        /* צבעים שונים לכל ריבוע */
        .square:nth-child(1) .square-title {
            color: #ff6b6b;
            border-bottom-color: rgba(255, 107, 107, 0.3);
        }

        .square:nth-child(1) .message {
            border-right-color: #ff6b6b;
        }
        .square:nth-child(1).safe .square-title {
            color: #4caf50; 
            border-bottom-color: rgba(76, 175, 80, 0.3);
        }
        
        .square:nth-child(1).safe .message {
            border-right-color: #4caf50;
        }

        /* Possible Alert State */
        body.possible-alert {
            background: linear-gradient(135deg, #2e1e0a 0%, #3e2a0e 50%, #231508 100%);
        }
        .square:nth-child(1).possible-alert .square-title {
            color: #ffaa44;
            border-bottom-color: rgba(255, 170, 68, 0.3);
        }
        .square:nth-child(1).possible-alert .message {
            border-right-color: #ffaa44;
        }

        .square:nth-child(2) .square-title {
            color: #4ecdc4;
            border-bottom-color: rgba(78, 205, 196, 0.3);
        }

        .square:nth-child(2) .message {
            border-right-color: #4ecdc4;
        }

        .square:nth-child(3) .square-title {
            color: #ffe66d;
            border-bottom-color: rgba(255, 230, 109, 0.3);
        }

        .square:nth-child(3) .message {
            border-right-color: #ffe66d;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
            100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
        }

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

        @media (max-height: 600px) {
            .square {
                min-height: 300px;
            }
        }

        @media (max-height: 400px) {
            .square {
                min-height: 200px;
            }
        }
