/* 
    PORTFOLIO LOADING ANIMATION - STYLES
    Complete CSS with animations, glow effects, and responsive design
*/

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    position: relative;
}

/* ===== LAPTOP SVG ANIMATION ===== */
.laptop-wrapper {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 0 auto 30px;
}

.laptop-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
}

.laptop-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 1.5s ease-out forwards;
}

/* Stagger the drawing animation */
#screen-border {
    animation-delay: 0s;
}

#laptop-base {
    animation-delay: 0.4s;
}

#key-line-1 {
    animation-delay: 0.8s;
}

#key-line-2 {
    animation-delay: 1s;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Glow pulse effect after drawing */
.laptop-svg {
    animation: laptopGlow 2s ease-in-out 1.5s infinite;
}

@keyframes laptopGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.8));
    }
}

/* ===== TERMINAL SCREEN ===== */
.terminal-screen {
    position: absolute;
    top: 25px;
    left: 55px;
    width: 190px;
    height: 90px;
    background: rgba(10, 10, 10, 0.95);
    border-radius: 3px;
    opacity: 0;
    animation: fadeInTerminal 0.5s ease-out 1.5s forwards;
    overflow: hidden;
}

@keyframes fadeInTerminal {
    to {
        opacity: 1;
    }
}

.terminal-header {
    background: rgba(0, 240, 255, 0.1);
    padding: 3px 8px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3);
}

.terminal-title {
    font-family: 'Courier New', monospace;
    font-size: 9px;
    color: #00f0ff;
    font-weight: bold;
}

.terminal-content {
    padding: 8px;
    font-family: 'Courier New', 'Fira Code', monospace;
    font-size: 9px;
    line-height: 1.4;
    color: #ffffff;
    text-align: left;
}

/* ===== CODE SYNTAX HIGHLIGHTING ===== */
.code-line {
    opacity: 0;
    transform: translateY(5px);
    margin-bottom: 2px;
}

.code-line.show {
    animation: typeIn 0.3s ease-out forwards;
}

@keyframes typeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.keyword {
    color: #ff006e;
    font-weight: bold;
}

.variable {
    color: #00f0ff;
}

.property {
    color: #7000ff;
}

.string {
    color: #00ff00;
}

.function {
    color: #00f0ff;
    font-style: italic;
}

.success {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.success-message {
    margin-top: 5px;
}

/* Blinking Cursor */
.cursor {
    color: #00f0ff;
    font-weight: bold;
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ===== PROGRESS INDICATOR ===== */
.progress-wrapper {
    margin-top: 40px;
}

.progress-percentage {
    font-size: 48px;
    font-weight: bold;
    color: #00f0ff;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
    margin-bottom: 15px;
    font-family: 'Arial', sans-serif;
    letter-spacing: 2px;
}

.progress-bar-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00f0ff, #7000ff);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}

/* ===== WELCOME MESSAGE ===== */
.welcome-message {
    font-size: 24px;
    color: #ffffff;
    margin-top: 20px;
    font-family: 'Arial', sans-serif;
    opacity: 0;
    transform: scale(0.8);
}

.welcome-message.show {
    animation: welcomeIn 0.6s ease-out forwards;
}

@keyframes welcomeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== SKIP BUTTON ===== */
.skip-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 240, 255, 0.1);
    border: 2px solid #00f0ff;
    color: #00f0ff;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.skip-button.show {
    animation: skipButtonIn 0.5s ease-out forwards;
}

@keyframes skipButtonIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skip-button:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transform: translateY(-2px);
}

.skip-button:active {
    transform: translateY(0);
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media screen and (max-width: 768px) {
    .laptop-wrapper {
        width: 250px;
        height: 170px;
    }
    
    .terminal-screen {
        top: 22px;
        left: 47px;
        width: 156px;
        height: 75px;
    }
    
    .terminal-content {
        font-size: 7px;
        padding: 6px;
    }
    
    .terminal-title {
        font-size: 7px;
    }
    
    .progress-percentage {
        font-size: 36px;
    }
    
    .progress-bar-container {
        width: 250px;
    }
    
    .welcome-message {
        font-size: 18px;
    }
    
    .skip-button {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .laptop-wrapper {
        width: 220px;
        height: 150px;
    }
    
    .terminal-screen {
        top: 20px;
        left: 42px;
        width: 136px;
        height: 66px;
    }
    
    .terminal-content {
        font-size: 6px;
        padding: 5px;
        line-height: 1.3;
    }
    
    .terminal-title {
        font-size: 6px;
        padding: 2px 6px;
    }
    
    .progress-percentage {
        font-size: 32px;
    }
    
    .progress-bar-container {
        width: 220px;
    }
    
    .welcome-message {
        font-size: 16px;
    }
    
    .skip-button {
        bottom: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 11px;
    }
}

/* ===== FLOATING PARTICLES (BONUS) ===== */
.loading-overlay::before,
.loading-overlay::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00f0ff;
    border-radius: 50%;
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.loading-overlay::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.loading-overlay::after {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    25% {
        transform: translate(20px, -30px);
        opacity: 0.6;
    }
    50% {
        transform: translate(-10px, -60px);
        opacity: 0.3;
    }
    75% {
        transform: translate(30px, -40px);
        opacity: 0.6;
    }
}
