/* Avatar Page Specific Styles */

/* Base Layout */
.avatar-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--cream);
}

.avatar-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    position: relative;
    min-height: calc(100vh - 140px);
    overflow: hidden;
}

.avatar-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-burgundy) 50%, var(--dark-brown) 100%);
    overflow: hidden;
}

/* Moroccan Zellige Pattern Overlay */
.zellige-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='rgba(212,175,55,0.15)' stroke-width='1.5'/%3E%3Cpath d='M30 10L50 30L30 50L10 30Z' fill='none' stroke='rgba(212,175,55,0.1)' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='5' fill='none' stroke='rgba(212,175,55,0.12)' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    opacity: 1;
    animation: patternShift 40s linear infinite;
    z-index: 0;
}

/* Moroccan Arch Framing Overlay */
.avatar-background::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 0;
    border: 30px solid rgba(212, 175, 55, 0.05);
    border-bottom: none;
    border-radius: 50% 50% 0 0 / 20% 20% 0 0;
    mask-image: radial-gradient(circle at 50% 0, black 70%, transparent 71%);
    pointer-events: none;
    z-index: 1;
}

@keyframes patternShift {
    0% { background-position: 0 0; }
    100% { background-position: 120px 120px; }
}

/* Moroccan Geometric Shapes */
.moroccan-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.moroccan-star {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--warm-gold), var(--desert-sand));
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 0.3;
    animation: starFloat 15s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.star-1 { top: 10%; left: 5%; animation-delay: 0s; }
.star-2 { top: 20%; right: 5%; width: 80px; height: 80px; animation-delay: 5s; }
.star-3 { bottom: 25%; left: 10%; width: 50px; height: 50px; animation-delay: 10s; }

.moroccan-diamond {
    position: absolute;
    width: 40px;
    height: 70px;
    background: linear-gradient(180deg, var(--terracotta), transparent);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    opacity: 0.25;
    animation: diamondFloat 20s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(198, 93, 7, 0.3));
}

.diamond-1 { top: 45%; right: 3%; animation-delay: 3s; }
.diamond-2 { bottom: 15%; right: 15%; width: 50px; height: 90px; animation-delay: 8s; }

.moroccan-arch {
    position: absolute;
    width: 80px;
    height: 120px;
    border: 3px solid rgba(212, 175, 55, 0.1);
    border-radius: 40px 40px 0 0;
    border-bottom: none;
    animation: archPulse 8s ease-in-out infinite;
}

.arch-1 { bottom: 10%; left: 5%; }
.arch-2 { top: 30%; right: 8%; width: 60px; height: 90px; animation-delay: 4s; }

@keyframes starFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.15; }
    50% { transform: translateY(-30px) rotate(180deg); opacity: 0.25; }
}

@keyframes diamondFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

@keyframes archPulse {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(1.05); }
}

/* Monument Silhouettes */
.monument-silhouettes {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    pointer-events: none;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
}

.silhouette {
    position: absolute;
    bottom: 0;
    background: linear-gradient(to top, rgba(60, 36, 20, 0.6), rgba(212, 175, 55, 0.1));
    filter: drop-shadow(0 -5px 15px rgba(0, 0, 0, 0.3));
}

.silhouette.koutoubia {
    left: 4%;
    width: 70px;
    height: 220px;
    clip-path: polygon(30% 100%, 30% 30%, 40% 30%, 40% 20%, 50% 0%, 60% 20%, 60% 30%, 70% 30%, 70% 100%);
    animation: silhouetteFloat 10s ease-in-out infinite;
}

.silhouette.hassan-tower {
    right: 5%;
    width: 90px;
    height: 280px;
    clip-path: polygon(25% 100%, 25% 10%, 35% 10%, 35% 5%, 50% 0%, 65% 5%, 65% 10%, 75% 10%, 75% 100%);
    animation: silhouetteFloat 12s ease-in-out infinite;
    animation-delay: 2s;
}

.silhouette.minaret {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 180px;
    clip-path: polygon(35% 100%, 35% 25%, 45% 25%, 45% 10%, 50% 0%, 55% 10%, 55% 25%, 65% 25%, 65% 100%);
    animation: silhouetteFloat 8s ease-in-out infinite;
    animation-delay: 4s;
    opacity: 0.6;
}

@keyframes silhouetteFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Avatar Container - Main Layout */
.avatar-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 30px;
    max-width: 1400px;
    width: 100%;
    height: calc(100vh - 200px);
    max-height: 700px;
}

/* Left Sidebar - Refined with Heritage Background */
.avatar-sidebar {
    background: linear-gradient(135deg, #ffffff, var(--desert-sand));
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(139, 38, 53, 0.1);
    background: linear-gradient(135deg, rgba(139, 38, 53, 0.05), rgba(212, 175, 55, 0.05));
}

.avatar-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--warm-gold), var(--terracotta));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.avatar-details h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--dark-brown);
    margin: 0 0 5px 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #666;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-indicator.online .status-dot {
    background: #25D366;
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chat History */
.chat-history-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px; /* Ensure minimum height */
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    background:
        linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0L40 20L20 40L0 20Z' fill='none' stroke='rgba(212,175,55,0.05)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 40px 40px;
}

.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #999;
}

.chat-welcome i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: rgba(139, 38, 53, 0.2);
}

.chat-welcome p {
    font-size: 0.95rem;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    background: linear-gradient(135deg, var(--warm-gold), var(--terracotta));
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}

.chat-message.assistant {
    background: rgba(139, 38, 53, 0.1);
    color: var(--dark-brown);
    margin-right: auto;
    border-bottom-left-radius: 6px;
}

/* Control Buttons */
.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(139, 38, 53, 0.1);
}

.control-btn {
    flex: 1;
    min-width: calc(50% - 5px);
    padding: 12px 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-red), var(--deep-burgundy));
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.control-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 38, 53, 0.3);
}

.control-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.control-btn.secondary {
    background: rgba(139, 38, 53, 0.1);
    color: var(--dark-brown);
}

.control-btn.secondary:hover:not(:disabled) {
    background: rgba(139, 38, 53, 0.2);
}

.control-btn.active {
    background: linear-gradient(135deg, #dc3545, #c82333);
    animation: recording 1.5s infinite;
}

@keyframes recording {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}

/* Text Input */
.text-input-container {
    padding: 15px 20px 20px;
    border-top: 1px solid rgba(139, 38, 53, 0.1);
}

.text-input-wrapper {
    display: flex;
    gap: 10px;
    background: rgba(139, 38, 53, 0.05);
    border-radius: 25px;
    padding: 5px 5px 5px 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.text-input-wrapper:focus-within {
    border-color: var(--warm-gold);
    background: white;
}

.text-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--dark-brown);
    outline: none;
}

.text-input-wrapper input::placeholder {
    color: #999;
}

.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--warm-gold), var(--terracotta));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* Main Avatar Panel */
.avatar-main {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* Start Session Panel */
.start-session-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 38, 53, 0.03), rgba(212, 175, 55, 0.03));
}

.start-session-panel[hidden] {
    display: none !important;
}

.start-content {
    text-align: center;
    padding: 40px;
    max-width: 500px;
}

.start-icon {
    font-size: 5rem;
    color: var(--warm-gold);
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.start-content h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--dark-brown);
    margin-bottom: 15px;
}

.start-content p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 30px;
}

.btn-large {
    padding: 18px 45px;
    font-size: 1.1rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 280px;
}

.start-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.start-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    min-width: 80px;
}

.start-feature i {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, rgba(139, 38, 53, 0.1), rgba(212, 175, 55, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-red);
    transition: all 0.3s ease;
}

.start-feature i:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--warm-gold), var(--terracotta));
    color: white;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

/* Avatar Video Panel */
.avatar-video-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.avatar-video-panel[hidden] {
    display: none !important;
}

.video-container {
    flex: 1;
    position: relative;
    background: radial-gradient(circle at center, var(--royal-blue) 0%, var(--dark-brown) 100%);
    overflow: hidden;
    border-bottom: 3px solid var(--warm-gold);
}

/* Moroccan Geometric Frame inside Video */
.video-container::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    pointer-events: none;
    z-index: 5;
    border-radius: 10px;
}

.video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0L100 50L50 100L0 50Z' fill='none' stroke='rgba(212,175,55,0.03)' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    pointer-events: none;
    z-index: 4;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Phone-like decoration around video */
.phone-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 6;
}

.deco-star {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--warm-gold), var(--desert-sand));
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: decoStarPulse 3s ease-in-out infinite;
}

.deco-star-1 {
    top: 10px;
    right: 10px;
    animation-delay: 0s;
}

.deco-star-2 {
    bottom: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    animation-delay: 1.5s;
}

@keyframes decoStarPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
}

#remoteVideo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#remoteVideo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#remoteVideo audio {
    display: none;
}

/* Loading State */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(212, 175, 55, 0.3);
    border-top-color: var(--warm-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-loading p {
    font-size: 1.1rem;
}

/* Subtitles */
.subtitles {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.1rem;
    max-width: 80%;
    text-align: center;
    z-index: 5;
}

/* Session Controls */
.session-controls {
    padding: 15px 20px;
    background: rgba(139, 38, 53, 0.05);
    display: flex;
    justify-content: center;
}

.session-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.session-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
}

/* Global Footer Integration */
.footer {
    background: var(--dark-brown);
    color: var(--cream);
    padding: 80px 0 40px;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--cream);
}

.footer-logo img {
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-description {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--warm-gold);
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--cream);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.footer-column a:hover {
    opacity: 1;
    color: var(--warm-gold);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    color: var(--warm-gold);
}

.social-link:hover {
    background: var(--warm-gold);
    color: var(--dark-brown) !important;
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    opacity: 0.8;
}

.back-link {
    color: var(--warm-gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-link:hover {
    color: var(--desert-sand);
    transform: translateX(-5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .avatar-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        gap: 20px;
    }

    .avatar-sidebar {
        max-height: 400px;
    }

    .avatar-main {
        min-height: 500px;
    }

    .start-content h2 {
        font-size: 2rem;
    }

    .start-features {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .avatar-section {
        padding: 90px 15px 30px;
    }

    .avatar-sidebar {
        max-height: none; /* Remove height restriction */
        min-height: 500px; /* Ensure adequate height */
    }

    .chat-history-container {
        min-height: 350px; /* Larger chat area on mobile */
    }

    .control-buttons {
        padding: 10px 15px;
    }

    .control-btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .start-content {
        padding: 30px 20px;
    }

    .start-icon {
        font-size: 4rem;
    }

    .start-content h2 {
        font-size: 1.8rem;
    }

    .start-features {
        flex-direction: column;
        gap: 15px;
    }

    .avatar-footer .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .avatar-sidebar {
        min-height: 450px; /* Slightly smaller but still adequate */
    }

    .chat-history-container {
        min-height: 300px; /* Ensure good chat visibility */
    }

    .sidebar-header {
        padding: 15px;
    }

    .avatar-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .avatar-details h3 {
        font-size: 1rem;
    }

    .chat-history {
        padding: 15px;
        gap: 12px; /* Slightly tighter spacing */
    }

    .control-btn span {
        display: none;
    }

    .control-btn {
        min-width: auto;
        flex: none;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        padding: 0;
    }

    .control-btn i {
        font-size: 1.2rem;
    }

    .control-buttons {
        justify-content: center;
    }
}

/* RTL Support */
[dir="rtl"] .back-link:hover {
    transform: translateX(5px);
}

[dir="rtl"] .chat-message.user {
    margin-left: 0;
    margin-right: auto;
    border-bottom-right-radius: 18px;
    border-bottom-left-radius: 6px;
}

[dir="rtl"] .chat-message.assistant {
    margin-right: 0;
    margin-left: auto;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 6px;
}

/* Full-screen Button Style */
.fullscreen-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: rgba(139, 38, 53, 0.6);
    backdrop-filter: blur(10px);
    color: var(--warm-gold);
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.fullscreen-btn:hover {
    transform: scale(1.1);
    background: rgba(139, 38, 53, 0.9);
    color: white;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Full-screen UI Enhancements */
#videoContainer:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    width: 100vw;
    height: 100vh;
}

#videoContainer:fullscreen video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

#videoContainer:fullscreen .fullscreen-btn {
    top: 40px;
    right: 40px;
}

#videoContainer:fullscreen .video-loading {
    background: rgba(0, 0, 0, 0.95);
}

#videoContainer:fullscreen .subtitles {
    bottom: 120px;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.85);
}

#videoContainer:fullscreen .phone-decoration {
    display: none;
}

/* Tablet and iPad View Adjustments */
@media (max-width: 1024px) {
    .avatar-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        gap: 20px;
    }

    .fullscreen-btn {
        top: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    #videoContainer:fullscreen .fullscreen-btn {
        top: 30px;
        right: 30px;
    }

    .monument-silhouettes {
        height: 180px;
        padding: 0 30px;
    }

    .silhouette.koutoubia { height: 160px; }
    .silhouette.hassan-tower { height: 200px; }
    .silhouette.minaret { height: 140px; }
}

/* Mobile View Adjustments */
@media (max-width: 768px) {
    .fullscreen-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    #videoContainer:fullscreen .fullscreen-btn {
        top: 20px;
        right: 20px;
    }

    #videoContainer:fullscreen .subtitles {
        bottom: 80px;
        font-size: 1.1rem;
        padding: 8px 16px;
        width: 90%;
    }

    .monument-silhouettes {
        height: 150px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    #videoContainer:fullscreen video {
        object-fit: cover; /* Fill screen on portrait mobile */
    }
    
    .fullscreen-btn {
        top: 10px;
        right: 10px;
    }

    .monument-silhouettes {
        display: none; /* Avoid clutter on very small screens */
    }
}

/* =================== FOOTER MOBILE RESPONSIVE =================== */

/* Tablet and Mobile */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-content {
        gap: 30px;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .back-link {
        order: -1;
    }
}
