:root {
    --bg-gradient-start: #000428;
    --bg-gradient-end: #004e92;
    --text-primary: #00d4ff;
    --text-secondary: #ffffff;
    --text-tertiary: #ffff00;
    --text-warning: #ff6b00;
    --high-tide: #00ff00;
    --low-tide: #ff8800;
    --divider: #666666;
    --now-line: #ff0000;
}

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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-secondary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 
             env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Time Section */
.time-section {
    text-align: center;
    margin-bottom: 20px;
}

.current-time {
    font-size: 3em;
    color: var(--text-primary);
    font-weight: bold;
    letter-spacing: 2px;
}

.current-date {
    font-size: 1.2em;
    color: var(--text-secondary);
    margin-top: 5px;
}

.divider {
    height: 2px;
    background: var(--divider);
    margin: 20px 0;
}

/* Tide Info Section */
.tide-info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.tide-label {
    color: var(--text-tertiary);
    font-size: 1em;
    margin-bottom: 5px;
}

.tide-type {
    font-size: 1em;
    margin-bottom: 5px;
    font-weight: bold;
}

.tide-type.high {
    color: var(--high-tide);
}

.tide-type.low {
    color: var(--low-tide);
}

.tide-time {
    font-size: 1.8em;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.tide-height {
    font-size: 1.4em;
    color: var(--text-primary);
}

/* Graph Section */
.graph-section {
    margin-top: 20px;
}

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.current-height {
    color: var(--text-tertiary);
    font-weight: bold;
}

#tideCanvas {
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

/* Install Button */
.install-btn {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background: var(--text-primary);
    color: var(--bg-gradient-start);
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.install-btn:hover {
    background: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.3);
}

/* Status Message */
.status-msg {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.status-msg.error {
    background: rgba(255, 0, 0, 0.2);
    color: var(--text-warning);
}

.status-msg.success {
    background: rgba(0, 255, 0, 0.2);
    color: var(--high-tide);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .current-time {
        font-size: 2.5em;
    }
    
    .current-date {
        font-size: 1em;
    }
    
    .tide-time {
        font-size: 1.5em;
    }
    
    .tide-height {
        font-size: 1.2em;
    }
    
    #tideCanvas {
        height: 200px;
    }
}

/* Landscape mode for small screens */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        max-width: 100%;
        padding: 10px;
    }
    
    .current-time {
        font-size: 2em;
    }
    
    #tideCanvas {
        height: 150px;
    }
}
