:root {
    --primary-color: #0a0a0a;
    --accent-color: #00ff88;
    --text-primary: #ffffff;
    --text-secondary: #888888;
}

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

body {
    background-color: var(--primary-color);
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    visibility: hidden;
}

body.loaded {
    visibility: visible;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
}

.website-name {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 20;
}

.website-name h1 {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 200;
    color: var(--text-primary);
    text-transform: lowercase;
    letter-spacing: 0.1em;
    margin: 0;
    text-align: left;
}

.title-cursor {
    display: inline-block;
    background-color: var(--text-primary);
    width: 2px;
    height: 0.8em;
    animation: blink 1s infinite;
    margin-left: 2px;
    transition: opacity 0.3s ease;
}

.text-display {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    max-width: 400px;
    padding: 2rem;
    z-index: 10;
}

.text-content {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.typewriter-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-primary);
    min-height: 200px;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.typewriter-text.active {
    opacity: 1;
}

.typewriter-cursor {
    display: inline-block;
    background-color: var(--text-primary);
    width: 2px;
    height: 1em;
    animation: blink 1s infinite;
    transition: opacity 0.3s ease;
}

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

.cube-container {
    width: 60vmin;
    height: 60vmin;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: all 0.3s ease;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.cube-container:active {
    cursor: grabbing;
}

#cube-canvas {
    width: 100%;
    height: 100%;
}

.mobile-nav {
    display: none; /* Hidden on desktop */
    flex-direction: row;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.mobile-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 80px;
}

.mobile-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.mobile-nav-btn:active {
    transform: scale(0.95);
}

/* Icons Container */
.icons-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 1000;
}

/* Help Icon */
.help-icon {
    position: relative;
    top: auto;
    right: auto;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.help-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.help-icon:active {
    transform: scale(0.95);
}

/* Contact Icon */
.contact-icon {
    position: relative;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.contact-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.contact-icon:active {
    transform: scale(0.95);
}

/* Contact Overlay */
.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.contact-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-form {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(20px);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.contact-overlay.active .contact-form {
    transform: scale(1);
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-header h2 {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.contact-content {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.contact-content p {
    margin: 0 0 1.5rem 0;
}

.contact-info {
    margin: 1.5rem 0;
}

.contact-item {
    margin: 1rem 0;
    padding: 0.5rem 0;
}

.contact-item strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Contact Form Fields */
.contact-form-fields {
    margin: 1.5rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-top: 1rem;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.submit-btn:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        justify-content: flex-start;
        align-items: center;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
        width: 100vw;
    }
    
    .website-name {
        position: static;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        order: 1;
        margin-bottom: 1rem;
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .website-name h1 {
        font-size: 1.5rem;
        text-align: center;
        margin: 0;
    }
    
    .mobile-nav {
        display: flex !important;
        opacity: 0;
        animation: fadeInNav 0.5s ease forwards;
        animation-delay: 2s; /* Show after title finishes typing */
    }
    
    .cube-container {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        width: 70vw;
        height: 70vw;
        max-width: 300px;
        max-height: 300px;
        order: 2;
        margin: 1rem auto;
    }
    
    .text-display {
        position: static;
        bottom: auto;
        left: auto;
        right: auto;
        transform: none;
        max-width: calc(100% - 2rem);
        padding: 1rem;
        order: 3;
        margin: 1rem;
        margin-bottom: 2rem;
        background: transparent;
        backdrop-filter: none;
        border: none;
        border-radius: 0;
        min-height: 200px;
        max-height: 50vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .text-content {
        text-align: left;
    }
    
    .typewriter-text {
        font-size: 0.85rem;
        line-height: 1.6;
        text-align: left;
        min-height: 150px;
        opacity: 0;
        transition: opacity 0.5s ease;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
        white-space: pre-wrap;
        width: 100%;
    }
    
    .typewriter-text.active {
        opacity: 1;
    }
    
    /* Icons container on mobile */
    .icons-container {
        top: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }
    
    /* Help icon smaller on mobile */
    .help-icon {
        width: 40px;
        height: 40px;
    }
    
    .help-icon svg {
        width: 18px;
        height: 18px;
    }
    
    /* Contact icon smaller on mobile */
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon svg {
        width: 18px;
        height: 18px;
    }
    
    /* Contact modal fixes for mobile */
    .contact-overlay {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .contact-form {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .contact-header {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .contact-header h2 {
        font-size: 1.2rem;
    }
    
    .contact-content {
        font-size: 0.9rem;
    }
    
    .contact-content p {
        margin: 0 0 1rem 0;
    }
    
    .contact-form-fields {
        margin: 1rem 0;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
        border-radius: 4px;
    }
    
    .form-group textarea {
        min-height: 80px;
    }
    
    .submit-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    .contact-info {
        margin: 1rem 0;
        font-size: 0.85rem;
    }
    
    .contact-item {
        margin: 0.5rem 0;
        padding: 0.3rem 0;
    }
    
    .close-btn {
        width: 25px;
        height: 25px;
        font-size: 1.5rem;
    }
}

/* Additional breakpoint for very small screens */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .website-name h1 {
        font-size: 1.3rem;
    }
    
    .text-display {
        max-width: calc(100% - 1rem);
        margin: 0.5rem;
        padding: 0.8rem;
        max-height: 45vh;
        min-height: 180px;
    }
    
    .typewriter-text {
        font-size: 0.8rem;
        line-height: 1.5;
        min-height: 120px;
    }
    
    .cube-container {
        width: 80vw;
        height: 80vw;
        max-width: 250px;
        max-height: 250px;
    }
}

/* Additional breakpoint for extra small screens */
@media (max-width: 360px) {
    .text-display {
        max-height: 40vh;
        min-height: 160px;
        padding: 0.6rem;
    }
    
    .typewriter-text {
        font-size: 0.75rem;
        line-height: 1.4;
        min-height: 100px;
    }
}

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