/* Sheph Smart System - Dark Gold Theme CSS */

:root {
    --gold-primary: #d4af37;
    --gold-secondary: #b8941f;
    --gold-light: #ffd700;
    --emerald-dark: #0d4f3c;
    --emerald-medium: #1a7a5e;
    --emerald-light: #2d9d7a;
    --dark-bg: #000000;
    --dark-secondary: #1a1a1a;
    --dark-tertiary: #2a2a2a;
    --text-light: #e0e0e0;
    --text-dark: #333333;
    --success: #4CAF50;
    --error: #f44336;
    --warning: #ff9800;
}

.sheph-device-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--emerald-dark) 50%, var(--dark-secondary) 100%);
    color: var(--text-light);
    min-height: 100vh;
}

/* Single Device Wrapper */
.sheph-single-device {
    margin-bottom: 50px;
}

.sheph-single-device:last-child {
    margin-bottom: 0;
}

/* Header Section */
.sheph-device-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--emerald-dark) 50%, var(--dark-bg) 100%);
    border-radius: 20px;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3), 0 0 20px rgba(45, 157, 122, 0.2);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.sheph-device-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sheph-device-header h1 {
    color: var(--gold-primary);
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
}

.sheph-device-ip {
    color: var(--gold-light);
    font-size: 1.2em;
    position: relative;
    z-index: 1;
}

/* Sensor Data Section */
.sheph-sensor-section {
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--emerald-dark) 30%, var(--dark-tertiary) 100%);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid var(--gold-primary);
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(45, 157, 122, 0.1);
}

.sheph-sensor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.sheph-sensor-card {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid var(--gold-primary);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sheph-sensor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s;
}

.sheph-sensor-card:hover::before {
    left: 100%;
}

.sheph-sensor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.sheph-sensor-label {
    color: var(--gold-light);
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.sheph-sensor-value {
    color: var(--gold-primary);
    font-size: 3em;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    margin: 10px 0;
}

.sheph-sensor-unit {
    font-size: 0.5em;
    color: var(--gold-light);
}

/* Charts Section */
.sheph-charts-section {
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--emerald-dark) 30%, var(--dark-tertiary) 100%);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid var(--gold-primary);
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(45, 157, 122, 0.1);
}

.sheph-charts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.sheph-charts-header h2 {
    color: var(--gold-primary);
    font-size: 1.8em;
    margin: 0;
}

.sheph-chart-periods {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sheph-chart-period-btn {
    padding: 10px 20px;
    background: var(--dark-bg);
    border: 2px solid var(--gold-primary);
    border-radius: 10px;
    color: var(--gold-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9em;
}

.sheph-chart-period-btn:hover,
.sheph-chart-period-btn.active {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%);
    color: var(--dark-bg);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.sheph-chart-container {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--emerald-dark) 100%);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--gold-primary);
    margin-bottom: 25px;
    min-height: 400px;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.2);
}

.sheph-chart-title {
    color: var(--gold-light);
    font-size: 1.2em;
    margin-bottom: 15px;
    text-align: center;
}

/* Buttons Section */
.sheph-buttons-section {
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--emerald-dark) 30%, var(--dark-tertiary) 100%);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid var(--gold-primary);
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(45, 157, 122, 0.1);
}

.sheph-buttons-section h2 {
    color: var(--gold-primary);
    font-size: 1.8em;
    margin-bottom: 25px;
    text-align: center;
}

.sheph-rooms-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.sheph-room-card {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid var(--gold-primary);
    transition: all 0.3s ease;
}

.sheph-room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.sheph-room-title {
    color: var(--gold-primary);
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold-primary);
    text-align: center;
}

.sheph-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.sheph-button {
    padding: 15px;
    border: 2px solid var(--gold-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 0.9em;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--dark-bg);
    color: var(--gold-primary);
}

.sheph-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s;
}

.sheph-button:hover::before {
    left: 100%;
}

.sheph-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.sheph-button.on {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--emerald-light) 100%);
    color: var(--dark-bg);
    border-color: var(--gold-secondary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5), 0 0 10px rgba(45, 157, 122, 0.3);
}

.sheph-button.off {
    background: linear-gradient(135deg, var(--dark-tertiary) 0%, var(--dark-secondary) 100%);
    color: var(--gold-light);
    border-color: var(--gold-primary);
}

.sheph-button-name {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.sheph-button-state {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Loading Animation */
.sheph-loading {
    text-align: center;
    padding: 40px;
    color: var(--gold-primary);
}

.sheph-spinner {
    border: 4px solid var(--dark-tertiary);
    border-top: 4px solid var(--gold-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sheph-device-container {
        padding: 10px;
    }
    
    .sheph-device-header h1 {
        font-size: 1.8em;
    }
    
    .sheph-sensor-grid {
        grid-template-columns: 1fr;
    }
    
    .sheph-charts-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sheph-chart-periods {
        justify-content: center;
    }
    
    .sheph-rooms-container {
        grid-template-columns: 1fr;
    }
    
    .sheph-buttons-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Chart Canvas Styling */
canvas {
    max-width: 100%;
    height: auto;
    background: transparent;
}

/* TradingView-style Chart Grid */
.sheph-chart-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sheph-chart-grid-line {
    stroke: rgba(212, 175, 55, 0.1);
    stroke-width: 1;
}

.sheph-chart-grid-line-major {
    stroke: rgba(212, 175, 55, 0.2);
    stroke-width: 1.5;
}

/* Message/Alert Styles */
.sheph-message-container {
    text-align: center;
    padding: 60px 20px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheph-message-box {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--dark-bg) 100%);
    padding: 50px 40px;
    border-radius: 20px;
    border: 3px solid var(--gold-primary);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.sheph-message-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.sheph-message-box h1 {
    color: var(--gold-primary);
    font-size: 2.5em;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.sheph-message-box p {
    color: var(--text-light);
    font-size: 1.3em;
    margin-bottom: 20px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.sheph-message-box .sheph-message-subtitle {
    color: var(--gold-light);
    font-size: 1.1em;
    margin-bottom: 35px;
    position: relative;
    z-index: 1;
}

.sheph-message-button {
    display: inline-block;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-secondary) 100%);
    color: var(--dark-bg);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2em;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
    position: relative;
    z-index: 1;
    border: 2px solid var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sheph-message-button:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.6);
    color: var(--dark-bg);
}

.sheph-message-button:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
}

/* Icon Styles */
.sheph-message-icon {
    font-size: 4em;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    display: block;
}

/* Device Separator */
.sheph-device-separator {
    height: 50px;
    border-bottom: 3px solid var(--gold-primary);
    margin: 40px 0;
    opacity: 0.3;
}

/* Responsive Message Styles */
@media (max-width: 768px) {
    .sheph-message-box {
        padding: 40px 25px;
        margin: 20px;
    }
    
    .sheph-message-box h1 {
        font-size: 2em;
    }
    
    .sheph-message-box p {
        font-size: 1.1em;
    }
    
    .sheph-message-button {
        padding: 15px 30px;
        font-size: 1em;
    }
}

