/* Professional Slideshow Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --text-light: #ecf0f1;
    --text-dark: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-light: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-medium: 0 15px 35px rgba(0,0,0,0.2);
    --shadow-heavy: 0 20px 40px rgba(0,0,0,0.3);
    --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s ease;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-color);
    overflow: hidden;
    height: 100vh;
    color: var(--text-light);
}

/* Slideshow Container */
.slideshow-container {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide.prev {
    transform: translateX(-100%);
}

.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide-bg-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
}

.slide-bg-2 {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #ff9ff3 100%);
    background-size: 300% 300%;
    animation: gradientShift 10s ease infinite;
}

.slide-bg-3 {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #a29bfe 100%);
    background-size: 300% 300%;
    animation: gradientShift 12s ease infinite;
}

.slide-bg-4 {
    background: linear-gradient(135deg, #00b894 0%, #00a085 50%, #55a3ff 100%);
    background-size: 300% 300%;
    animation: gradientShift 9s ease infinite;
}

.slide-bg-5 {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 50%, #a29bfe 100%);
    background-size: 300% 300%;
    animation: gradientShift 10s ease infinite;
}

.slide-bg-6 {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 50%, #fd79a8 100%);
    background-size: 300% 300%;
    animation: gradientShift 11s ease infinite;
}

.slide-bg-7 {
    background: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 50%, #6c5ce7 100%);
    background-size: 300% 300%;
    animation: gradientShift 7s ease infinite;
}

.slide-content {
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Welcome Slide */
.slide-header .slide-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, #f1c40f, #fff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 3s ease infinite;
    text-shadow: 0 0 30px rgba(255,255,255,0.5);
}

.slide-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.9;
}

.celebration-message {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
}

.celebration-emoji {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: sparkleRotate 3s ease-in-out infinite;
    letter-spacing: 10px;
}

.celebration-text {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--warning-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.countdown-display {
    display: flex;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.countdown-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 100px;
    transition: var(--transition-fast);
}

.countdown-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-5px);
}

.countdown-item span {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.countdown-item label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

.professional-quote {
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.6;
    margin: 40px 0 20px;
    max-width: 800px;
    position: relative;
}

.professional-quote::before,
.professional-quote::after {
    content: '"';
    font-size: 4rem;
    position: absolute;
    opacity: 0.3;
    color: var(--warning-color);
}

.professional-quote::before {
    top: -20px;
    left: -40px;
}

.professional-quote::after {
    bottom: -60px;
    right: -40px;
}

.author {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Teacher Profile Slides */
.teacher-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 20px auto 40px auto;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    box-sizing: border-box;
}

.teacher-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    animation: avatarFloat 3s ease-in-out infinite;
    flex-shrink: 0;
}

.math-avatar {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4);
}

.physics-avatar {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    box-shadow: 0 20px 40px rgba(116, 185, 255, 0.4);
}

.chemistry-avatar {
    background: linear-gradient(135deg, #00b894, #00a085);
    box-shadow: 0 20px 40px rgba(0, 184, 148, 0.4);
}

.cs-avatar {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    box-shadow: 0 20px 40px rgba(162, 155, 254, 0.4);
}

.english-avatar {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    box-shadow: 0 20px 40px rgba(253, 121, 168, 0.4);
}

.teacher-info {
    text-align: center;
    color: white;
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.teacher-name {
    font-size: 2.8rem;
    font-weight: 600;
    margin: 20px auto 15px auto;
    line-height: 1.4;
    color: white;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10;
    text-align: center;
    width: fit-content;
    max-width: 90%;
    word-wrap: break-word;
    box-sizing: border-box;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    padding: 15px 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.teacher-subject {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 25px;
    color: var(--warning-color);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    display: block;
    visibility: visible;
    z-index: 10;
    position: relative;
}

.subject-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.appreciation-section {
    max-width: 900px;
    text-align: center;
    width: 100%;
}

.teacher-quote {
    font-size: 1.6rem;
    font-style: italic;
    font-weight: 300;
    margin: 0 0 30px 0;
    padding: 25px 30px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    border-left: 5px solid var(--warning-color);
    backdrop-filter: blur(15px);
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.teacher-quote::before {
    content: '💭';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 2rem;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appreciation-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 40px;
    opacity: 0.95;
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.visual-element {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Subject-specific Visual Elements */
.math-visual .equation-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: #ff6b6b;
    background: rgba(255,255,255,0.1);
    padding: 20px 40px;
    border-radius: 10px;
    animation: mathGlow 2s ease-in-out infinite;
}

.physics-visual .atom-model {
    position: relative;
    width: 120px;
    height: 120px;
}

.nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #74b9ff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px #74b9ff;
}

.electron-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid rgba(116, 185, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit1 {
    width: 60px;
    height: 60px;
    animation: rotate 2s linear infinite;
}

.orbit2 {
    width: 90px;
    height: 90px;
    animation: rotate 3s linear infinite reverse;
}

.orbit3 {
    width: 120px;
    height: 120px;
    animation: rotate 4s linear infinite;
}

.electron {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #0984e3;
    border-radius: 50%;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px #0984e3;
}

.chemistry-visual .molecule-structure {
    position: relative;
    width: 120px;
    height: 120px;
}

.atom {
    position: absolute;
    border-radius: 50%;
}

.carbon {
    width: 30px;
    height: 30px;
    background: #00b894;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px #00b894;
}

.hydrogen {
    width: 20px;
    height: 20px;
    background: #00a085;
    box-shadow: 0 0 10px #00a085;
}

.h1 { top: 10px; left: 50%; transform: translateX(-50%); }
.h2 { bottom: 10px; left: 50%; transform: translateX(-50%); }
.h3 { top: 50%; left: 10px; transform: translateY(-50%); }
.h4 { top: 50%; right: 10px; transform: translateY(-50%); }

.bond {
    position: absolute;
    width: 3px;
    background: rgba(0, 184, 148, 0.6);
}

.bond1 { height: 35px; top: 25px; left: 50%; transform: translateX(-50%); }
.bond2 { height: 35px; bottom: 25px; left: 50%; transform: translateX(-50%); }
.bond3 { width: 35px; height: 3px; top: 50%; left: 25px; transform: translateY(-50%); }
.bond4 { width: 35px; height: 3px; top: 50%; right: 25px; transform: translateY(-50%); }

.cs-visual .code-block {
    background: #2c3e50;
    color: #74b9ff;
    font-family: 'Courier New', monospace;
    padding: 30px;
    border-radius: 12px;
    text-align: left;
    border: 1px solid rgba(116, 185, 255, 0.3);
    position: relative;
}

.code-line {
    margin: 8px 0;
    opacity: 0;
    animation: codeTypeIn 0.5s ease forwards;
}

.code-line:nth-child(1) { animation-delay: 0.5s; }
.code-line:nth-child(2) { animation-delay: 1s; }
.code-line:nth-child(3) { animation-delay: 1.5s; }

.code-cursor {
    display: inline-block;
    color: #00b894;
    animation: blink 1s infinite;
    font-weight: bold;
}

.english-visual .book-display {
    background: rgba(253, 121, 168, 0.15);
    color: #fd79a8;
    font-size: 1.8rem;
    font-weight: 600;
    padding: 25px 40px;
    border-radius: 12px;
    border: 2px solid rgba(253, 121, 168, 0.3);
    backdrop-filter: blur(10px);
    letter-spacing: 2px;
    animation: bookGlow 3s ease-in-out infinite;
}

/* Thank You Slide */
.thank-you-section {
    text-align: center;
    max-width: 900px;
}

.thank-you-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ff6b6b, #74b9ff, #00b894, #a29bfe, #fd79a8);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: colorFlow 4s ease infinite;
}

.thank-you-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
}

.final-message {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 50px;
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.signature-section {
    margin-top: 50px;
}

.student-message-input {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.student-message-input input {
    flex: 1;
    max-width: 400px;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    color: var(--text-dark);
    outline: none;
}

.add-message-btn {
    background: linear-gradient(45deg, #fd79a8, #e84393);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
}

.add-message-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.student-signatures {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.signature {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    animation: signatureSlideIn 0.5s ease;
}

/* Slideshow Controls */
.slideshow-controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Progress Bar */
.progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #74b9ff, #00b894, #a29bfe, #fd79a8);
    width: 0%;
    transition: width 0.6s ease;
}

/* Animations */
@keyframes sparkleRotate {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        filter: hue-rotate(90deg);
    }
}

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

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

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

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

@keyframes mathGlow {
    0%, 100% {
        text-shadow: 0 0 10px #ff6b6b;
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    }
    50% {
        text-shadow: 0 0 20px #ff6b6b, 0 0 30px #ff6b6b;
        box-shadow: 0 0 40px rgba(255, 107, 107, 0.5);
    }
}

@keyframes bookGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(253, 121, 168, 0.3);
        border-color: rgba(253, 121, 168, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(253, 121, 168, 0.6);
        border-color: rgba(253, 121, 168, 0.6);
    }
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes codeTypeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

@keyframes signatureSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .slide-content {
        padding: 30px 15px;
        min-height: 100vh;
    }
    
    .slide-header .slide-title {
        font-size: 2.2rem;
    }
    
    .professional-quote {
        font-size: 1.2rem;
        padding: 15px;
    }
    
    .teacher-profile {
        margin: 15px auto 25px auto;
        gap: 20px;
        padding: 15px;
    }
    
    .teacher-name {
        font-size: 2.2rem;
        line-height: 1.4;
        margin: 15px auto 12px auto;
        padding: 12px 25px;
        max-width: 95%;
        letter-spacing: 0.5px;
    }
    
    .teacher-subject {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .subject-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .stat-item {
        min-width: 110px;
        padding: 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .teacher-quote {
        font-size: 1.2rem;
        padding: 18px;
    }
    
    .appreciation-text {
        font-size: 1.05rem;
        padding: 18px;
    }
    
    .thank-you-title {
        font-size: 2.8rem;
    }
    
    .slideshow-controls {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .control-btn {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
    
    .student-message-input {
        flex-direction: column;
        align-items: center;
    }
    
    .student-message-input input {
        max-width: 280px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .slide-content {
        padding: 20px 10px;
        min-height: 100vh;
    }
    
    .slide-header .slide-title {
        font-size: 1.8rem;
    }
    
    .teacher-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .teacher-profile {
        margin: 10px auto 20px auto;
        gap: 15px;
        padding: 10px;
    }
    
    .teacher-name {
        font-size: 1.8rem;
        line-height: 1.3;
        font-weight: 600;
        margin: 10px auto 8px auto;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 10px 20px;
        max-width: 98%;
        word-break: break-word;
        letter-spacing: 0.3px;
    }
    
    .teacher-subject {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .subject-stats {
        gap: 10px;
    }
    
    .stat-item {
        min-width: 95px;
        padding: 12px 8px;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .teacher-quote {
        font-size: 1rem;
        padding: 15px;
    }
    
    .appreciation-text {
        font-size: 0.95rem;
        padding: 15px;
    }
    
    .thank-you-title {
        font-size: 2.2rem;
    }
    
    .professional-quote::before,
    .professional-quote::after {
        display: none;
    }
    
    .nav-dots {
        display: none;
    }
    
    .slide-counter {
        font-size: 0.9rem;
    }
}
