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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    /*display: flex;*/
    justify-content: center;
    /*align-items: center;*/
    background: #000;
    color: white;
    overscroll-behavior-x: none;
}

canvas, video {
    margin: 0 auto;
}

/* Waiting message styling */
.waiting-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
    color: white;
}

.waiting-message p {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #E82127;
    text-shadow: 0 0 10px rgba(232, 33, 39, 0.3);
}

.loading-indicator {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid #E82127;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tesla-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
}

.tesla-header {
    text-align: center;
    padding: 20px 0;
}

.tesla-header h1 {
    font-size: 4em;
    font-weight: 600;
    color: #E82127; /* Vibrant Tesla Red */
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(232, 33, 39, 0.3);
}

.tesla-header h2 {
    font-size: 1.5em;
    font-weight: 400;
    color: #ccc;
}

.tesla-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 50px; /* Increased spacing between elements */
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.connection-status {
    display: flex;
    align-items: center;
    background: rgba(26, 27, 31, 0.9);
    border-radius: 12px;
    padding: 25px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-left: 6px solid #00B2FF; /* More vibrant Tesla Blue */
    transform: translateZ(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.connection-status:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.status-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00B2FF; /* More vibrant Tesla Blue */
    margin-right: 20px;
    box-shadow: 0 0 15px #00B2FF;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 178, 255, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(0, 178, 255, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 178, 255, 0);
    }
}

.status-message {
    flex: 1;
}

.status-message p {
    font-size: 1.3em;
    margin-bottom: 8px;
}

.status-message .note {
    font-size: 0.9em;
    color: #aaa;
}

.notification-card {
    display: flex;
    align-items: flex-start;
    background: rgba(26, 27, 31, 0.9);
    border-radius: 12px;
    padding: 25px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-left: 6px solid #f9a825; /* Warning yellow */
    transform: translateZ(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notification-card:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.notification-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin-right: 15px;
    color: #f9a825;
}

.notification-icon svg {
    width: 30px;
    height: 30px;
}

.notification-content h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #f9a825;
}

.notification-content p {
    font-size: 1em;
    line-height: 1.5;
}

.download-section {
    background: rgba(26, 27, 31, 0.9);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-left: 6px solid #00C2B1; /* Vibrant Tesla Green */
    background-image: radial-gradient(rgba(0, 194, 177, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-section:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.download-section::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(to left, rgba(0, 194, 177, 0.15), transparent);
    pointer-events: none;
}

.download-section h3 {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: #00C2B1; /* Vibrant Tesla Green */
    position: relative;
    display: inline-block;
    text-shadow: 0 0 10px rgba(0, 194, 177, 0.3);
}

.download-section h3::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: #00C2B1;
    box-shadow: 0 0 5px rgba(0, 194, 177, 0.5);
}

.download-options {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
    margin-top: 20px;
}

.qr-code {
    background: white;
    padding: 15px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 194, 177, 0.3);
}

.qr-code:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 194, 177, 0.5);
}

.qr-code img {
    width: 150px;
    height: 150px;
}

.play-store-button {
    display: inline-block;
    transition: transform 0.3s ease;
}

.play-store-button:hover {
    transform: scale(1.1);
}

.play-store-button img {
    height: 70px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.tesla-footer {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
}

#log {
    position: absolute;
    bottom: 0;
    right: 10px;
    color: #ffeb00;
    font-size: 1.4em;
}

#warning {
    position: absolute;
    bottom: 0;
    right: 10px;
    font-size: 1.4em;
    color: #e82127; /* Tesla Red */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tesla-content {
        padding: 10px;
    }
    
    .download-options {
        flex-direction: column;
    }
    
    .tesla-header h1 {
        font-size: 2.5em;
    }
    
    .tesla-header h2 {
        font-size: 1.2em;
    }
}

@media (max-height: 700px) {
    .tesla-content {
        gap: 15px;
    }
    
    .connection-status, .notification-card, .download-section {
        padding: 15px;
    }
}
