* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #000000;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Old Bubble Menu CSS removed to prevent conflict with React Bits */
/* Form Styles */
.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #cbd5e1;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.btn {
    width: 100%;
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

.text-center {
    text-align: center;
}

.title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.error-text {
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.success-text {
    color: #10b981;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1000px;
    width: 100%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(30, 41, 59, 0.5);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    border-radius: 10px;
    width: auto;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.table-container {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    backdrop-filter: blur(12px);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
    font-weight: 600;
    text-align: left;
    padding: 1.2rem 1.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn.del:hover {
    background: rgba(239, 68, 68, 0.8);
}

.bubble-input {
  border: none;
  background: transparent;
  font-size: clamp(1.5rem, 3vw, 3rem);
  color: #111;
  text-align: center;
  width: 80%;
  outline: none;
  font-family: inherit;
}
.bubble-input::placeholder {
  color: #94a3b8;
}

/* Device Cards & Pump Control */
.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.device-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.device-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(56, 189, 248, 0.2);
}

.device-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.device-info h4 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.device-info p {
    font-size: 0.8rem;
    color: #38bdf8;
    font-family: monospace;
}

.control-section {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 0.5rem;
}

.control-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
}

.status-on { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-off { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.status-info { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }

.btn-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 10px;
}

.control-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.control-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.control-btn.active {
    background: #38bdf8;
    color: #fff;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.control-btn.active.on { background: #10b981; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.control-btn.active.off { background: #ef4444; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.control-btn.active.info { background: #6366f1; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }

/* Existing table tweaks */
.table-container {
    margin-top: 1rem;
}
