/* --------------------------------------------------
   morarji & KRIES RESULT PORTAL DESIGN SYSTEM
   -------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette - Warm, playful, and extremely premium */
    --bg-gradient: linear-gradient(135deg, #FFF9F5 0%, #F0F4FF 50%, #F5ECFF 100%);
    
    --primary-color: #6366F1; /* Indigo */
    --primary-hover: #4F46E5;
    --primary-light: #EEF2FF;
    
    --secondary-color: #EC4899; /* Pink */
    --secondary-hover: #DB2777;
    --secondary-light: #FDF2F8;
    
    --success-color: #10B981; /* Emerald Mint */
    --success-light: #ECFDF5;
    
    --error-color: #F43F5E; /* Coral Red */
    --error-light: #FFF1F2;
    
    --warning-color: #F59E0B; /* Golden Amber */
    --warning-light: #FEF3C7;
    
    --text-dark: #1E293B; /* Slate 800 */
    --text-medium: #475569; /* Slate 600 */
    --text-light: #64748B; /* Slate 500 */
    --white: #FFFFFF;
    
    /* Institution Card Solid Background & Glowing Glow */
    --inst-bg: linear-gradient(135deg, #4F46E5 0%, #3B82F6 100%); /* Solid warm high-contrast blue/indigo */
    
    /* Shadows & Border Radius */
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-radius-sm: 12px;
    --border-radius-md: 20px;
    --border-radius-lg: 32px;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
    
    /* Font Families */
    --font-heading: 'Quicksand', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    --transition-speed: 0.3s;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow-x: hidden;
    position: relative;
    padding: clamp(12px, 4vw, 24px);
}

/* --------------------------------------------------
   PLAYFUL BACKGROUND DECORATIONS
   -------------------------------------------------- */
.decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.05);
    backdrop-filter: blur(5px);
    animation: float-bubble 15s infinite ease-in-out;
}

.bubble-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: -50px;
    background: rgba(236, 72, 153, 0.06);
    animation-duration: 18s;
}

.bubble-2 {
    width: 250px;
    height: 250px;
    bottom: -50px;
    right: -50px;
    background: rgba(59, 130, 246, 0.05);
    animation-duration: 25s;
}

.bubble-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 85%;
    background: rgba(245, 158, 11, 0.04);
    animation-duration: 12s;
}

.star {
    position: absolute;
    font-size: 24px;
    opacity: 0.6;
    animation: float-star 8s infinite ease-in-out;
}

.star-1 { top: 15%; right: 15%; animation-delay: 0s; }
.star-2 { bottom: 20%; left: 10%; animation-delay: 2s; font-size: 32px; }
.star-3 { top: 60%; left: 5%; animation-delay: 4s; }
.star-4 { bottom: 40%; right: 8%; animation-delay: 1s; }

@keyframes float-bubble {
    0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
    50% { transform: translateY(-30px) scale(1.05) rotate(180deg); }
}

@keyframes float-star {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.4; }
    50% { transform: translateY(-15px) rotate(45deg) scale(1.2); opacity: 0.8; }
}

/* --------------------------------------------------
   MAIN APP CONTAINER
   -------------------------------------------------- */
.app-container {
    width: 100%;
    max-width: 680px;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

/* --------------------------------------------------
   SECTIONS & ACTIVE TRANSITION STATES
   -------------------------------------------------- */
.view-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------
   1. LOADING SCREEN
   -------------------------------------------------- */
.loading-card {
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 50px 30px;
    box-shadow: var(--shadow-md);
    border: 1px dashed rgba(99, 102, 241, 0.2);
}

.bouncing-loader {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.bouncing-loader span {
    font-size: 40px;
    animation: bounce 1.2s infinite ease-in-out;
}

.bouncing-loader span:nth-child(2) { animation-delay: 0.2s; }
.bouncing-loader span:nth-child(3) { animation-delay: 0.4s; }

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

.loading-card h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.loading-card p {
    color: var(--text-light);
    font-size: 16px;
}

.header-section {
    text-align: center;
    margin-bottom: 30px;
}

.institute-brand-title {
    font-family: var(--font-heading);
    font-size: clamp(13px, 3.5vw, 19px);
    font-weight: 800;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    border: 2px dashed rgba(99, 102, 241, 0.2);
    display: inline-block;
    padding: clamp(8px, 2vw, 12px) clamp(16px, 3.5vw, 24px);
    border-radius: 20px;
    margin-bottom: clamp(15px, 4vw, 25px);
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    animation: gentle-wobble 6s infinite ease-in-out;
    max-width: 100%;
    line-height: 1.4;
}

@keyframes gentle-wobble {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(0.4deg) scale(1.01); }
}

.badge-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    font-family: var(--font-heading);
}

.portal-title {
    font-family: var(--font-heading);
    font-size: clamp(24px, 5.5vw, 32px);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.portal-subtitle {
    color: var(--text-medium);
    font-size: clamp(14px, 2.5vw, 16px);
    line-height: 1.6;
    padding: 0 clamp(5px, 2vw, 10px);
}

/* CARDS */
.card {
    background: var(--white);
    border-radius: var(--border-radius-md);
    padding: clamp(20px, 5vw, 35px) clamp(16px, 4vw, 30px);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

@media (hover: hover) {
    .search-card:hover {
        box-shadow: var(--shadow-lg);
    }
}

/* INPUTS */
.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 16px;
    font-family: var(--font-heading);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: clamp(14px, 3vw, 18px);
    font-size: clamp(18px, 4vw, 20px);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-wrapper input {
    width: 100%;
    padding: clamp(14px, 3.5vw, 18px) clamp(16px, 3vw, 20px) clamp(14px, 3.5vw, 18px) clamp(40px, 8vw, 50px);
    border-radius: var(--border-radius-sm);
    border: 2px solid #E2E8F0;
    font-size: clamp(16px, 4vw, 18px);
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-dark);
    background: #F8FAFC;
    transition: all var(--transition-speed);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.input-wrapper input::placeholder {
    color: #94A3B8;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.error-msg {
    color: var(--error-color);
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    display: none;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* BUTTONS */
.btn {
    width: 100%;
    padding: clamp(14px, 3.5vw, 18px) clamp(20px, 4vw, 24px);
    border-radius: var(--border-radius-sm);
    font-size: clamp(16px, 4vw, 18px);
    font-weight: 700;
    font-family: var(--font-heading);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4F46E5 100%);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

@media (hover: hover) {
    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 25px -5px rgba(99, 102, 241, 0.6);
    }
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: #E2E8F0;
    color: var(--text-medium);
}

@media (hover: hover) {
    .btn-secondary:hover {
        background: #CBD5E1;
        color: var(--text-dark);
        transform: translateY(-2px);
    }
}

.btn-icon {
    font-size: 20px;
    transition: transform var(--transition-speed);
}

@media (hover: hover) {
    .btn-primary:hover .btn-icon {
        transform: scale(1.2) rotate(5deg);
    }
}

/* HELPER INFO BOX */
.helper-info {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-left: 5px solid var(--warning-color);
    padding: 20px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    box-shadow: var(--shadow-sm);
}

.helper-info h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-weight: 700;
}

.helper-info p {
    font-size: 14px;
    color: var(--text-medium);
    line-height: 1.6;
}

/* --------------------------------------------------
   3. RESULT SCREEN (SUCCESS)
   -------------------------------------------------- */
.success-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-brand {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.result-brand-title {
    font-family: var(--font-heading);
    font-size: clamp(18px, 4.5vw, 24px);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.result-brand-subtitle {
    font-family: var(--font-body);
    font-size: clamp(11px, 2.5vw, 14px);
    font-weight: 600;
    color: var(--text-medium);
    letter-spacing: 0.2px;
}

.celebration-emoji {
    font-size: clamp(45px, 12vw, 55px);
    margin-bottom: 10px;
    animation: celebrate 1.5s infinite ease-in-out;
}

@keyframes celebrate {
    0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
    50% { transform: translateY(-10px) scale(1.1) rotate(5deg); }
}

.student-name {
    font-family: var(--font-heading);
    font-size: clamp(22px, 6vw, 34px);
    font-weight: 800;
    color: var(--text-dark);
    text-transform: capitalize;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.congrats-text {
    color: var(--success-color);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* THROBBING SOLID BACKGROUND INSTITUTION CARD */
.institution-card {
    background: var(--inst-bg);
    border-radius: var(--border-radius-md);
    padding: clamp(20px, 4.5vw, 30px);
    text-align: center;
    color: var(--white);
    margin-bottom: clamp(20px, 4.5vw, 30px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.institution-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.card-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.institution-name {
    font-family: var(--font-heading);
    font-size: clamp(18px, 4.5vw, 26px);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    word-break: break-word;
}

.inst-category-badge-container {
    display: flex;
    justify-content: center;
}

.inst-category-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    backdrop-filter: blur(5px);
}

/* Throbbing Pulse Animation */
@keyframes throb {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 20px 40px rgba(99, 102, 241, 0.55), 0 0 15px rgba(59, 130, 246, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
    }
}

.throbbing-element {
    animation: throb 2s infinite ease-in-out;
}

/* DETAILS GRID */
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(10px, 2.5vw, 15px);
    margin-bottom: clamp(25px, 5vw, 35px);
}

.detail-card {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    padding: clamp(12px, 3vw, 16px) clamp(14px, 3.5vw, 20px);
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 15px);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform var(--transition-speed);
}

@media (hover: hover) {
    .detail-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: rgba(99, 102, 241, 0.2);
    }
}

.col-span-2 {
    grid-column: span 2;
}

.detail-icon {
    font-size: clamp(20px, 4.5vw, 28px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    width: clamp(40px, 9vw, 50px);
    height: clamp(40px, 9vw, 50px);
    flex-shrink: 0;
    border-radius: 50%;
}

.detail-card:nth-child(2) .detail-icon { background: var(--secondary-light); }
.detail-card:nth-child(3) .detail-icon { background: var(--warning-light); }
.detail-card:nth-child(4) .detail-icon { background: var(--success-light); }
.detail-card:nth-child(5) .detail-icon { background: rgba(59, 130, 246, 0.08); }

.detail-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.detail-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 2px;
}

.detail-value {
    font-size: clamp(14px, 3vw, 16px);
    color: var(--text-dark);
    font-weight: 700;
    word-break: break-word;
}

/* ACTION BUTTONS */
.action-buttons {
    margin-top: 10px;
}

/* --------------------------------------------------
   4. ERROR / NOT FOUND SCREEN
   -------------------------------------------------- */
.error-card {
    text-align: center;
    border-top: 6px solid var(--error-color);
}

.error-emoji {
    font-size: 60px;
    margin-bottom: 15px;
}

.error-card h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.error-card p {
    color: var(--text-medium);
    font-size: 16px;
    margin-bottom: 25px;
}

.troubleshoot-box {
    background: var(--error-light);
    border: 1px dashed rgba(244, 63, 94, 0.3);
    border-radius: var(--border-radius-sm);
    padding: clamp(15px, 4vw, 20px);
    text-align: left;
    margin-bottom: clamp(20px, 4.5vw, 30px);
}

.troubleshoot-box h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    color: var(--error-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.troubleshoot-box ul {
    list-style-type: none;
}

.troubleshoot-box li {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.troubleshoot-box li::before {
    content: '⭐';
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 12px;
}

/* --------------------------------------------------
   FOOTER STYLE
   -------------------------------------------------- */
.app-footer {
    text-align: center;
    padding: 25px 10px;
    width: 100%;
    z-index: 10;
}

.app-footer p {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

/* --------------------------------------------------
   RESPONSIVE DESIGN ADAPTATIONS
   -------------------------------------------------- */
@media (max-width: 600px) {
    .details-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .col-span-2 {
        grid-column: span 1;
    }
}

/* Ultra-small devices (Galaxy Fold, small mobile viewports) */
@media (max-width: 360px) {
    body {
        padding: 8px;
    }
    
    .card {
        padding: 18px 14px;
        border-radius: var(--border-radius-sm);
    }
    
    .portal-logo {
        width: 110px;
        padding: 6px;
    }
    
    .institute-brand-title {
        font-size: 11px;
        padding: 6px 12px;
        margin-bottom: 12px;
    }
    
    .portal-title {
        font-size: 20px;
    }
    
    .portal-subtitle {
        font-size: 13px;
    }
    
    .student-name {
        font-size: 20px;
    }
    
    .institution-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .institution-name {
        font-size: 16px;
    }
    
    .detail-card {
        padding: 10px 12px;
    }
}

/* --------------------------------------------------
   LOGO STYLES
   -------------------------------------------------- */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.portal-logo {
    width: 150px;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    background: var(--white);
    padding: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow var(--transition-speed);
}

@media (hover: hover) {
    .portal-logo:hover {
        transform: scale(1.08) rotate(2deg);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-color);
    }
}

/* --------------------------------------------------
   COACHING AD SLIDESHOW
   -------------------------------------------------- */
.coaching-slideshow-container {
    margin-top: 30px;
    text-align: center;
    background: var(--white);
    border-radius: var(--border-radius-md);
    padding: clamp(14px, 3vw, 20px);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform var(--transition-speed);
}

.slideshow-header {
    font-family: var(--font-heading);
    font-size: clamp(13px, 2.5vw, 15px);
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.slideshow-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px; /* Increased for premium visual on larger screens */
    margin: 0 auto;
    cursor: grab;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--white);
    outline: 2px solid rgba(99, 102, 241, 0.15);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, outline-color 0.3s ease;
    user-select: none;
    touch-action: pan-y; /* Prevent full-page scroll gestures when dragging vertically */
}

.slideshow-wrapper.dragging {
    cursor: grabbing;
}

@media (hover: hover) {
    .slideshow-wrapper:hover {
        transform: scale(1.03);
        box-shadow: var(--shadow-md);
        outline-color: var(--primary-color);
    }
}

.slideshow-slides {
    display: flex;
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 12;
    background: #f1f5f9;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.slide-img {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.slideshow-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.35);
    padding: 5px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.slide-dot.active {
    background: var(--white);
    transform: scale(1.2);
}

/* --------------------------------------------------
   FULLSCREEN MODAL SYSTEM
   -------------------------------------------------- */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95); /* Dark Slate 900 overlay */
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
}

.fullscreen-modal.active {
    display: flex;
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: clamp(15px, 4vw, 30px);
    right: clamp(15px, 4vw, 30px);
    color: var(--white);
    font-size: clamp(28px, 6vw, 36px);
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
    width: clamp(36px, 8vw, 44px);
    height: clamp(36px, 8vw, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--secondary-color);
    transform: scale(1.1) rotate(90deg);
    background: rgba(255, 255, 255, 0.2);
}

.modal-content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 95%;
    max-height: 95%;
}

.modal-img {
    max-width: 100%;
    max-height: 70vh;
    aspect-ratio: 9 / 12;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--white);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fullscreen-modal.active .modal-img {
    transform: scale(1);
}

.modal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-btn {
    padding: clamp(10px, 2.5vw, 14px) clamp(16px, 4vw, 24px);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-size: clamp(14px, 3.5vw, 16px);
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    color: var(--text-dark);
    background: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) {
    .modal-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    }
}

#modal-download {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4F46E5 100%);
    color: var(--white);
}

#modal-share {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #DB2777 100%);
    color: var(--white);
}

/* Beautiful Premium Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10002;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    pointer-events: none;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --------------------------------------------------
   SLIDESHOW & MODAL RESPONSIVE ADAPTATIONS
   -------------------------------------------------- */
@media (max-width: 480px) {
    .slideshow-wrapper {
        max-width: 280px; /* Compact size for standard mobile viewports */
    }
    .modal-img {
        max-height: 60vh; /* More room for modal action buttons on small mobile displays */
    }
    .modal-actions {
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 10px;
    }
    .modal-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 340px) {
    .slideshow-wrapper {
        max-width: 230px; /* Safe size for tiny mobile devices like Galaxy Fold */
    }
    .coaching-slideshow-container {
        padding: 10px;
        margin-top: 20px;
    }
}

