 body {
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     margin: 0;
     padding: 15px;
     /* Arvutis kõrvuti */
     gap: 20px;
     background: #f4f7f6;
     height: 95vh;
     box-sizing: border-box;
 }

 /* Rakenduse põhiraamistik */
 .app-container {
     display: flex;
     flex-direction: row;
     gap: 20px;
     padding: 20px;
     flex: 1;
     /* Täidab headeri ja footeri vahelise ala */
 }

 /* Headeri stiilid */
 .main-header {
     background: #407e1a;
     /* Tumesinine */
     color: white;
     padding: 20px 40px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
 }

 .header-content h1 {
     margin: 0;
     font-size: 1.8em;
     text-transform: uppercase;
     letter-spacing: 1px;
 }

 .header-content p {
     margin: 5px 0 0 0;
     opacity: 0.8;
 }

 /* Footeri stiilid */
 .main-footer {
     background: #f0f0f0;
     color: #666;
     padding: 20px;
     text-align: center;
     border-top: 1px solid #ddd;
     margin-top: auto;
 }

 .footer-links {
     margin-top: 10px;
 }

 .footer-links a {
     color: #227e1a;
     text-decoration: none;
     margin: 0 10px;
     font-size: 0.9em;
 }

 .footer-links a:hover {
     text-decoration: underline;
 }

 /* Video ala seadistus */
 .video-area {
     flex: 2;
     min-width: 0;
     /* Oluline flexboxi puhul */
     position: relative;
 }

 .video-wrapper {
     position: relative;
     padding-bottom: 56.25%;
     height: 0;
     overflow: hidden;
     border-radius: 12px;
     box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
     background: #000;
 }

 .video-wrapper iframe {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
 }

 /* Külgriba (Nimekiri) */
 .sidebar {
     flex: 1;
     min-width: 320px;
     background: white;
     padding: 20px;
     border-radius: 12px;
     box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
     display: flex;
     flex-direction: column;
     max-height: 100%;
 }

 .racer-list {
     overflow-y: auto;
     flex-grow: 1;
     list-style: none;
     padding: 0;
     margin: 0;
     max-height: 60vh;
 }

 #ovName {
     margin-top: 2px;
     margin-bottom: 2px;
 }

 .racer-item {
     display: flex;
     /* Paneb nime ja nupu kõrvuti */
     align-items: center;
     justify-content: space-between;
 }

 .share-btn {
     background: #f0f0f0;
     border: 1px solid #ccc;
     border-radius: 4px;
     padding: 5px 8px;
     cursor: pointer;
     margin-left: 10px;
     transition: all 0.2s;
 }

 .share-btn:hover {
     background: #00acc1;
     color: white;
     border-color: #008b9a;
 }

 /* --- MOBIILI VAADE (Ekraanid kuni 850px laiusega) --- */
 /* Mobiili kohandused */
 @media (max-width: 850px) {
     .app-container {
         flex-direction: column;
         padding: 10px;
     }

     .main-header {
         padding: 15px;
         text-align: center;
     }

     body {
         flex-direction: column;
         /* Video üles, nimekiri alla */
         height: auto;
         padding: 10px;
     }

     .video-area {
         width: 100%;
         position: sticky;
         /* Video jääb kerides üles kleepuma */
         top: 0;
         z-index: 100;
         background: #f4f7f6;
         padding-bottom: 10px;
     }

     .sidebar {
         width: 100%;
         min-width: unset;
         height: 60vh;
         /* Nimekiri võtab mobiilis kindla osa ekraanist */
         box-sizing: border-box;
     }

     .overlay h2 {
         font-size: 1.1em;
     }

     .overlay .details {
         font-size: 1em;
     }

     #ovTime {
         font-size: 1.1em;
     }
 }

 /* Sinu olemasolev ülekate ja muud stiilid jäävad samaks... */
 .overlay {
     position: absolute;
     bottom: 2%;
     left: 5%;
     right: 5%;
     background: rgba(0, 0, 0, 0.8);
     color: white;
     padding: 12px;
     border-radius: 8px;
     display: none;
     pointer-events: none;
     z-index: 10;
     border-left: 5px solid #ffd700;
 }

 /* Otsi üles .overlay .details stiil ja asenda see sellega */
 .overlay .details {
     font-size: 1.2em;
     display: flex;
     justify-content: space-between;
     /* Lükkab elemendid servadesse */
     align-items: center;
     /* Joondab nad kõrguse poolest keskele */
     width: 100%;
     margin-top: 5px;
 }

 /* Lisame eraldi stiili aja jaoks, et see oleks alati nähtav ja selge */
 #ovTime {
     font-weight: bold;
     font-family: monospace;
     /* Monospace font hoiab numbrid paigal, et nad ei hüppaks */
     font-size: 1.3em;
     text-align: right;
     min-width: 100px;
     /* Broneerib ajale piisavalt ruumi */
 }