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

html {
    height: 100%;
}

body {
    min-height: 100%;
}

@keyframes watercolorShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(
        135deg,
        #d94e63 0%,
        #8b3a62 15%,
        #4a7c9e 30%,
        #5fa8d3 45%,
        #c44569 60%,
        #904e55 75%,
        #6b8e9f 90%,
        #d94e63 100%
    );
    background-size: 400% 400%;
    background-attachment: fixed;
    animation: watercolorShift 50s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 20px 40px 20px;
    position: relative;
}

@media (max-width: 768px) {
    body {
        padding: 10px 10px 30px 10px;
    }
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(217, 78, 99, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(95, 168, 211, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 58, 98, 0.2) 0%, transparent 60%);
    animation: watercolorShift 60s ease-in-out infinite reverse;
    pointer-events: none;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    padding: 40px;
    position: relative;
    z-index: 1;
    margin: 20px auto;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px auto;
    }
}

h1 { 
    color: #d94e63; 
    margin-bottom: 10px; 
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.cranberry-icon {
    width: 48px;
    height: 48px;
    display: inline-block;
}

.login-form .cranberry-icon {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto 20px auto;
}

.login-form h1 {
    font-size: 3em;
    display: block;
}

.subtitle { 
    color: #666; 
    margin-bottom: 30px;
    text-align: center; 
}

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

input[type="text"], input[type="password"] {
    width: 100%;
    max-width: 300px;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
}

input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #d94e63;
}

button, .btn {
    background: linear-gradient(135deg, #d94e63 0%, #8b3a62 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover, .btn:hover { 
    transform: translateY(-2px);
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(217, 78, 99, 0.4);
}

.error { 
    color: #dc3545; 
    margin-bottom: 15px;
    text-align: center; 
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #d94e63;
}

.info-card h3 { 
    color: #d94e63; 
    margin-bottom: 10px; 
    font-size: 1.1em; 
}

.info-card p { 
    color: #333; 
    line-height: 1.6; 
}

.vnc-link { 
    display: block; 
    text-align: center; 
    margin: 30px 0; 
}

.instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.instructions h2 { 
    color: #d94e63; 
    margin-bottom: 15px; 
}

.instructions h3 { 
    color: #8b3a62; 
    margin: 20px 0 10px 0; 
}

.instructions p { 
    color: #333; 
    line-height: 1.6; 
    margin-bottom: 10px; 
}

.instructions code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.instructions pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 15px 0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.logout { 
    text-align: center; 
    margin-top: 30px; 
}

.logout a { 
    color: #666; 
    text-decoration: none; 
}

.logout a:hover { 
    color: #d94e63; 
}

/* Tailscale guide specific styles */
h2 { 
    color: #8b3a62; 
    margin: 30px 0 15px 0; 
    font-size: 1.5em; 
}

h3 { 
    color: #666; 
    margin: 20px 0 10px 0; 
    font-size: 1.2em; 
}

h4 {
    color: #888;
    margin: 15px 0 8px 0;
    font-size: 1.05em;
}

p { 
    color: #333; 
    margin-bottom: 15px; 
    line-height: 1.6; 
}

ul, ol { 
    margin-left: 25px; 
    margin-bottom: 15px; 
    line-height: 1.8; 
}

li { color: #333; }

.warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.device-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #8b3a62;
    color: white;
}

tr:hover {
    background: #f5f5f5;
}

/* Wide container for guide pages */
.container.wide {
    max-width: 900px;
}
