/* Base Styles */
:root {
    --primary-color: #ffffff;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #e0e0e0;
    --light-color: #f8f9fa;
    --border-color: rgba(255, 255, 255, 0.1);
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: fixed;
    background: #f7f8fa; /* Soft off-white background */
    width: 100%;
}


@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, 50px) rotate(90deg);
    }
    50% {
        transform: translate(0, 100px) rotate(180deg);
    }
    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

.container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
    gap: 50px;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.typewriter-bg-text {
    position: fixed;
    top: 32px;
    left: 32px;
    z-index: 1;
    pointer-events: auto;
}

.typewriter-bg-text-right {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 1;
    pointer-events: auto;
    text-align: right;
}

#typewriter-line1, #typewriter-line2, #typewriter-line3 {
    display: inline-block;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
    font-size: 0.95rem;
    color: #fff;
    background: #111;
    padding: 6px 18px 6px 18px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 0;
    width: 0;
    overflow: hidden;
    transition: width 0.12s cubic-bezier(0.4, 0.2, 0.2, 1);
    white-space: pre;
}

#typewriter-line1, #typewriter-line2 {
    pointer-events: none;
}

#typewriter-line3 {
    cursor: pointer;
    text-decoration: none;
    visibility: hidden;
    pointer-events: auto;
}

#typewriter-line3:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Download container and options */
.download-container {
    position: relative;
    display: inline-block;
}

.download-options {
    position: absolute;
    top: 0;
    left: calc(100% + 10px);
    display: none;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.download-options.typing-complete {
    display: flex;
}

.download-container:hover .download-options {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.download-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #333;
    color: white;
    border-radius: 0px;
    cursor: pointer;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.download-option:hover {
    background: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.download-option i {
    font-size: 16px;
    margin-bottom: 2px;
}

.download-option[data-format="pdf"] i {
    color: #FF5722;
}

.download-option[data-format="word"] i {
    color: #2196F3;
}

#typewriter-line-right1, #typewriter-line-right2, #typewriter-line-right3 {
    display: inline-block;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
    font-size: 0.95rem;
    color: #fff;
    background: #111;
    padding: 6px 18px 6px 18px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 0;
    width: 0;
    overflow: hidden;
    transition: width 0.12s cubic-bezier(0.4, 0.2, 0.2, 1);
    white-space: pre;
    cursor: pointer;
    text-decoration: none;
    visibility: hidden;
}

#typewriter-line-right1:hover, #typewriter-line-right2:hover, #typewriter-line-right3:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#typewriter-line2, #typewriter-line3 {
    margin-top: 8px;
}

#typewriter-line-right2, #typewriter-line-right3 {
    margin-top: 8px;
}

.floating-audio-player {
    position: fixed;
    bottom: 32px;
    left: 32px;
    z-index: 1;
}

/* Tablet view adjustments for audio player */
@media (min-width: 481px) and (max-width: 992px) {
    .floating-audio-player {
        left: 0;
        padding-left: 20px;
    }
}

.typewriter-bg-text-bottom-right {
    display: inline-block;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
    font-size: 0.95rem;
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1;
    pointer-events: auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

#qr-code-container {
    background: #111;
    padding: 4px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
    visibility: hidden;
}

#qr-code-container.visible {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

#qr-code-image {
    width: 120px;
    height: 120px;
    display: block;
}