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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #1ea896 0%, #1976d2 100%);
            padding: 20px;
            min-height: 100vh;
        }

        /* Login Page Styles */
        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 20px;
        }

        .login-box {
            background: white;
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            width: 100%;
            max-width: 450px;
        }

        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .login-header svg {
            filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
            margin-bottom: 20px;
        }

        .login-header h1 {
            color: #1ea896;
            font-size: 2em;
            margin-bottom: 10px;
        }

        .login-header p {
            color: #666;
            font-size: 0.9em;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            color: #333;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .form-group input {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 1em;
            transition: border-color 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: #1ea896;
        }

        .login-button {
            width: 100%;
            background: linear-gradient(135deg, #1ea896 0%, #1976d2 100%);
            color: white;
            border: none;
            padding: 14px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 1.1em;
            transition: transform 0.3s, box-shadow 0.3s;
            margin-top: 10px;
        }

        .login-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(30, 168, 150, 0.3);
        }

        .error-message {
            background: #fed7d7;
            color: #742a2a;
            padding: 10px 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            display: none;
        }

        /* Dashboard Styles */
        .dashboard-container {
            display: none;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        .dashboard-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .dashboard-title {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .header-info {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .logout-button {
            background: linear-gradient(135deg, #1ea896 0%, #1976d2 100%);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .logout-button:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(30, 168, 150, 0.3);
        }

        h1 {
            color: #1ea896;
            margin: 0;
            font-size: 2em;
        }

        .dashboard {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            grid-auto-rows: min-content;
        }

        .card {
            background: #f8f9fa;
            border: 2px solid #e0e0e0;
            border-radius: 15px;
            padding: 20px;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .card.span-2-rows {
            grid-row: span 2;
        }

        .card.span-2-cols {
            grid-column: span 2;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        .card-title {
            font-size: 1.1em;
            font-weight: 600;
            color: #333;
            margin-bottom: 15px;
            text-align: center;
        }

        .card-content {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .data-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
        }

        .label {
            color: #666;
            font-weight: 500;
        }

        .value {
            font-weight: 700;
            color: #1976d2;
            font-size: 1.1em;
        }

        .button {
            background: linear-gradient(135deg, #1ea896 0%, #1976d2 100%);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .button:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(30, 168, 150, 0.3);
        }

        .button.active {
            background: #e53e3e;
        }

        .slider {
            width: 100%;
            height: 6px;
            border-radius: 5px;
            background: #ddd;
            outline: none;
            appearance: none;
            -webkit-appearance: none;
        }

        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, #1ea896 0%, #1976d2 100%);
            cursor: pointer;
        }

        .slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(135deg, #1ea896 0%, #1976d2 100%);
            cursor: pointer;
            border: none;
        }

        .buzzer-controls {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }

        .buzzer-btn {
            flex: 1;
            padding: 10px;
            border: 2px solid #ddd;
            background: #f5f5f5;
            color: #999;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
            position: relative;
        }

        .buzzer-btn::after {
            content: 'OFF';
            display: block;
            font-size: 0.8em;
            margin-top: 5px;
            font-weight: 700;
        }

        .buzzer-btn.active {
            background: linear-gradient(135deg, #e53e3e 0%, #ff6b6b 100%);
            color: white;
            border-color: #e53e3e;
            box-shadow: 0 0 20px rgba(229, 62, 62, 0.5);
            animation: pulse 1.5s infinite;
        }

        .buzzer-btn.active::after {
            content: 'ON';
        }

        @keyframes pulse {
            0%, 100% {
                box-shadow: 0 0 20px rgba(229, 62, 62, 0.5);
            }
            50% {
                box-shadow: 0 0 30px rgba(229, 62, 62, 0.8);
            }
        }

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

        .status-open {
            background: #48bb78;
        }

        .status-closed {
            background: #e53e3e;
        }

        .color-display {
            width: 100%;
            height: 60px;
            border-radius: 8px;
            border: 2px solid #ddd;
            margin-top: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            color: white;
            text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
        }

        .light-controls {
            display: flex;
            gap: 15px;
            margin-top: 10px;
        }

        .light-control {
            flex: 1;
        }

        .light-label {
            font-size: 0.9em;
            color: #666;
            margin-bottom: 5px;
        }

        @media (max-width: 1024px) {
            .dashboard {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .card.span-2-cols {
                grid-column: span 1;
            }
        }

        @media (max-width: 640px) {
            body {
                padding: 10px;
            }
            
            .dashboard-header {
                flex-direction: column;
                align-items: stretch;
                gap: 12px;
            }
            
            .dashboard-title {
                justify-content: center;
                gap: 10px;
            }
            
            .dashboard-title h1 {
                font-size: 1.3em;
            }
            
            .dashboard-title img {
                width: 40px;
                height: 40px;
            }
            
            .header-info {
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                width: 100%;
            }
            
            #connectionStatus {
                display: block;
                text-align: center;
                padding: 8px 10px !important;
                border-radius: 6px;
                font-size: 0.85em !important;
                margin: 0 !important;
            }
            
            #lastUpdate {
                display: block;
                text-align: center;
                padding: 8px 10px !important;
                border-radius: 6px;
                font-size: 0.85em !important;
                background: #f0f0f0;
                color: #666 !important;
                margin: 0 !important;
            }
            
            #userEmail {
                display: block;
                text-align: center;
                background: #f8f9fa;
                padding: 8px 10px !important;
                border-radius: 6px;
                font-size: 0.8em !important;
                color: #666 !important;
                margin: 0 !important;
            }
            
            .logout-button {
                width: 100%;
                padding: 12px 20px;
                margin: 0 !important;
            }
            
            /* Reduce container padding on mobile */
            .container {
                padding: 15px;
                border-radius: 15px;
            }
            
            /* Single column layout on mobile */
            .dashboard {
                grid-template-columns: 1fr;
            }
            
            .card.span-2-cols,
            .card.span-2-rows {
                grid-column: span 1;
                grid-row: span 1;
            }
            
            /* Make cards more compact */
            .card {
                padding: 15px;
            }
            
            .card-title {
                font-size: 1em;
                margin-bottom: 12px;
            }
            
            .data-row {
                padding: 6px 0;
            }
            
            .value {
                font-size: 1em;
            }
        }

        .connection-status {
            text-align: center;
            padding: 10px;
            margin-bottom: 20px;
            border-radius: 8px;
            font-weight: 600;
        }

        .connected {
            background: #c6f6d5;
            color: #22543d;
        }

        .disconnected {
            background: #fed7d7;
            color: #742a2a;
        }
