body {
    background-color: #000000;
    color: #f5f5f5;
    font-family: 'Anonymous Pro', 'Courier New', monospace;
    margin: 0;
    padding: 0;
}

.cursor {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(245, 245, 245, 0.8);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    backdrop-filter: blur(2px);
    background: rgba(245, 245, 245, 0.1);
    box-shadow: 0 0 20px rgba(245, 245, 245, 0.3);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: #f5f5f5;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 10px rgba(245, 245, 245, 0.8);
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor.hover {
    transform: translate(-50%, -50%) scale(1.5);
    border-color: rgba(0, 255, 94, 0.8);
    box-shadow: 0 0 30px rgba(0, 255, 94, 0.4);
    background: rgba(0, 255, 94, 0.1);
}

.cursor-dot.hover {
    transform: translate(-50%, -50%) scale(0);
}

.cursor.click {
    transform: translate(-50%, -50%) scale(0.8);
}

.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(245, 245, 245, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr minmax(500px, 500px);
    gap: 2rem;
    overflow: hidden;
}

.container > section {
    max-width: 500px;
    width: 500px;
    min-width: 500px;
    overflow: hidden;
    box-sizing: border-box;
}

.interactive-title {
    cursor: pointer;
    user-select: none;
    transition: font-family 0.3s ease, transform 0.15s ease;
}

.interactive-title:hover {
    transform: scale(1.02);
}

.interactive-title .letter {
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
    color: #f5f5f5;
}

.interactive-title .letter.green {
    color: #00ff5e !important;
    text-shadow: 0 0 10px rgba(0, 255, 94, 0.5) !important;
    transform: scale(1.1);
}

.nav-links {
    margin-top: 4rem;
}

.nav-links a {
    display: block;
    color: #f5f5f5;
    text-decoration: none;
    font-size: 1.2rem;
    margin: 1rem 0;
    padding: 0.5rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.nav-links a:hover {
    opacity: 1;
    transform: translateX(10px);
}

.chat-container {
    background: rgba(20, 20, 20, 0.95);
    padding: 1.5rem;
    border-radius: 8px;
    height: 92vh;
    display: flex;
    flex-direction: column;
    width: 500px;
    max-width: 500px;
    min-width: 500px;
    overflow: hidden;
    box-sizing: border-box;
    contain: layout size style;
    flex-shrink: 0;
    flex-grow: 0;
    transition: all 0.3s ease;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 1rem;
    padding: 0.5rem;
    color: #38ff38e5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: calc(500px - 3rem);
    max-width: calc(500px - 3rem);
    min-width: calc(500px - 3rem);
    box-sizing: border-box;
}

.chat-message {
    margin-bottom: 0.3rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    hyphens: auto;
    max-width: calc(500px - 4rem);
    width: calc(500px - 4rem);
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    display: block;
}

.chat-message span:first-child {
    color: #888;
    font-size: 0.9em;
}

.chat-message span {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    max-width: calc(450px - 4rem);
    width: auto;
    display: inline-block;
    box-sizing: border-box;
    overflow: hidden;
    vertical-align: top;
    white-space: pre-wrap;
}

/* Force break any content that might still try to expand */
.chat-message * {
    max-width: calc(500px - 4rem) !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
}

/* Absolute containment for any stubborn elements */
.chat-container, .chat-container * {
    contain: layout;
}

.chat-messages, .chat-message {
    min-width: 0 !important;
    flex-shrink: 1 !important;
}

.admin-message {
    color: #00ffe5 !important;
    font-weight: bold;
}

.admin-message span:last-child {
    color: #00ffe5 !important;
}

.chat-input {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 0.1rem;
    padding: 0.5rem;
    background: rgba(30, 30, 30, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(245, 245, 245, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.chat-input:focus-within {
    border-color: rgba(245, 245, 245, 0.3);
    box-shadow: 0 0 20px rgba(245, 245, 245, 0.1);
    transform: translateY(-1px);
}

.chat-input input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #f5f5f5;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.chat-input input::placeholder {
    color: rgba(245, 245, 245, 0.5);
    font-style: italic;
}

.chat-input input:focus {
    background: rgba(245, 245, 245, 0.05);
}

.chat-input button {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.1), rgba(245, 245, 245, 0.05));
    color: #f5f5f5;
    border: 1px solid rgba(245, 245, 245, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.chat-input button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 245, 245, 0.1), transparent);
    transition: left 0.5s ease;
}

.chat-input button:hover {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.2), rgba(245, 245, 245, 0.1));
    border-color: rgba(245, 245, 245, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245, 245, 245, 0.1);
}

.chat-input button:hover::before {
    left: 100%;
}

.chat-input button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 245, 245, 0.05);
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.15rem;
    padding-right: 0.1rem;
}

.char-counter.warning {
    color: #ffd43b;
}

.char-counter.danger {
    color: #ff6b6b;
}

.server-message {
    color: rgb(255, 255, 255);
}

.user-message {
    color: rgb(255, 0, 0); /* Server messages for specific users */
}

.spotify-embed {
    margin-top: 9rem;
    padding: 1.5rem !important;
    background: rgba(30, 30, 30, 0.8) !important;
    border-radius: 20px !important;
    border: 2px solid rgba(245, 245, 245, 0.7) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 450px;
    width: 450px;
}

.spotify-embed:hover {
    border-color: rgba(0, 255, 94, 0.6);
    border: 2px solid rgba(0, 255, 94, 0.6) !important;
    box-shadow: 0 12px 40px rgba(0, 255, 94, 0.1), 0 0 30px rgba(0, 255, 94, 0.2);
    transform: translateY(-2px);
    transition: 375ms;
}

.spotify-embed:hover .song-of-the-day {
    color: rgba(0, 255, 94, 0.9);
    text-shadow: 0 0 10px rgba(0, 255, 94, 0.5);
    transition: 800ms;
}

.spotify-embed iframe {
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 100% !important;
    max-width: 100%;
}

.song-of-the-day {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: #f5f5f5;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    align-self: flex-start;
    opacity: 0.7;
    font-family: 'Anonymous Pro', 'Courier New', monospace;
    font-weight: 550;
}

.project-list {
    margin: 20px;
    padding: 10px;
    border-radius: 5px;
}
.project-item {
    margin: 10px 0;
}
.project-item a.project-title {
    color: rgb(255, 255, 255);
    text-decoration: underline;
    font-size: 24px;
}
.project-item a {
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: underline;
}
.project-item a:hover {
    text-decoration: underline;
}
.github-link {
    text-decoration: none;
}
.github-link:hover {
    text-decoration: underline;
}
.images {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}
.images img {
    max-width: 900px;
    max-height: 600px;
    margin: 0 5px;
}
.link-images {
    justify-content: center;
    justify-items: center;
    margin-left: 30%;
}
.link-images img {
    margin: 0 4px;
    max-height: 500px
}
.uniform-title {
    color: rgb(255, 255, 255);
    text-decoration: underline;
    font-weight: bold;
    font-size: 1.5em;
    text-shadow: 1px 1px 2px rgb(0, 255, 94);
}
.uniform-description {
    font-size: 1.2em;
    font-weight: normal;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgb(0, 255, 94);
}
.uniform-link {
    color: white;
    text-decoration: underline;
    font-weight: bold;
    font-size: 1em;
    text-shadow: 1px 1px 2px rgb(0, 255, 94);
}
.uniform-link:hover {
    text-decoration: underline;
}

.door-icon {
    background-image: url('../media/doorClosed.png');
    background-size: cover;
    width: 80px; /* Adjust size as needed */
    height: 90px; /* Adjust size as needed */
    display: inline-block; /* Ensure it behaves like a block element */
    margin-left: 5px;
    margin-top: 5px;
}

.door-icon:hover {
    background-image: url('../media/doorOpen.png');
}

.door-icon img {
    display: none; /* Hide the default image */
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
        max-width: 100vw;
    }
    
    .cursor, .cursor-dot, .cursor-trail {
        display: none !important;
    }
    
    .main-content {
        width: 100%;
        max-width: 100%;
    }
    
    .nav-links {
        margin-top: 2rem;
    }
    
    .nav-links a {
        font-size: 1.1rem;
        margin: 0.8rem 0;
        padding: 0.75rem;
    }
    
    .spotify-embed {
        margin-top: 3rem;
        width: 100%;
        max-width: 100%;
        padding: 1rem !important;
    }
    
    .spotify-embed iframe {
        width: 100% !important;
    }
    
    .container > section {
        max-width: 100%;
        width: 100%;
        min-width: auto;
    }
    
    .chat-container {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        height: 60vh;
        padding: 1rem;
        margin: 0;
    }
    
    .chat-messages {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 0.25rem;
    }
    
    .chat-message {
        max-width: 100%;
        width: 100%;
    }
    
    .chat-message * {
        max-width: 100% !important;
    }
    
    .chat-input {
        padding: 0.4rem;
        gap: 0.5rem;
        border-radius: 10px;
    }
    
    .chat-input input {
        padding: 0.6rem 0.8rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .chat-input button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .char-counter {
        font-size: 0.75rem;
        margin-top: 0.1rem;
    }
    
    .images {
        display: block;
        justify-content: center;
        margin-top: 6px;
    }
    .images img {
        max-width: 100%;
        max-height: 600px;
        margin: 0 0 7px;
    }
    .link-images {
        justify-content: center;
    }
    .link-images img {
        margin: 0 4px;
        max-height: 500px;
        max-width: 75%;
    }
}
