/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

body {
    font-family: 'Space Mono', monospace;
    background-color: #0B0C14;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.5s ease;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #8483DE;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid #8483DE;
    transition: width 0.2s, height 0.2s;
}

/* Overlay Styles */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 12, 20, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease-in-out;
}

.overlay-content {
    color: white;
    font-size: 26px;
    text-align: center;
}

/* Container Styles */
.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.grid-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    perspective: 1500px; /* Increased perspective for more dramatic effect */
    z-index: -1;
    overflow: hidden;
}

.grid-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(127, 133, 236, 0.15) 1px, transparent 1px), 
                linear-gradient(90deg, rgba(127, 133, 236, 0.15) 1px, transparent 1px);
    background-size: 80px 80px; /* Larger grid squares */
    transform-origin: center center;
    transform: translate(-50%, -50%) rotateX(75deg); /* Adjusted angle for better ground effect */
    animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 800px;
    }
}

/* Info Container */
.info-container {
    background-color: #141521;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid #272A3A;
    z-index: 1;
    margin-bottom: 20px;
}

.name {
    color: #7F85EC;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 10px;
    padding-bottom: 20px;
}

.typewriter-container {
    height: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.typewriter-text {
    color: #939db8;
    font-size: 1rem;
    display: inline-block;
    text-align: center;
}

.role {
    display: inline-block;
    color: #939db8;
    position: relative;
    border-right: 2px solid #939db8;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent }
}

.static-text {
    color: #939db8;
    font-size: 1rem;
    display: inline-block; /* Changed from inline to inline-block for better spacing control */
    white-space: nowrap;
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.icon-wrapper {
    position: relative;
}

.social-icons i {
    color: #8483DE;
    font-size: 24px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.social-icons i:hover {
    transform: translateY(-5px);
}

.tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #8483DE;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    white-space: nowrap;
}

.icon-wrapper:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Volume Controls */
.volume-container {
    position: absolute;
    top: 30px;
    left: 30px;
    background-color: #141521;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #272A3A;
    z-index: 10;
}

.volume-icon-container {
    cursor: pointer;
}

#volume-icon {
    color: #8483DE;
    font-size: 20px;
}

#volume-slider {
    -webkit-appearance: none;
    width: 100px;
    height: 6px;
    background: #272A3A;
    border-radius: 5px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #8483DE;
    cursor: pointer;
}

#volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #8483DE;
    cursor: pointer;
    border: none;
}

/* Media Controller Container */
.media-container {
    background-color: #141521;
    padding: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid #272A3A;
    z-index: 1;
}

.media-icon-container {
    margin-right: 20px;
}

.media-icon-container i {
    color: #8483DE;
    font-size: 24px;
}

.media-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.media-control-buttons {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.media-control-buttons i {
    color: #8483DE;
    font-size: 20px;
    margin-right: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.media-control-buttons i:hover {
    transform: scale(1.1);
}

.progress-container {
    width: 100%;
}

.track-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: #939db8;
    font-size: 0.8rem;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #272A3A;
    border-radius: 3px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background-color: #8483DE;
    width: 0;
    transition: width 0.1s linear;
}

/* Notification */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: #141521;
    border: 1px solid #272A3A;
    border-radius: 12px;
    padding: 15px;
    z-index: 1001;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    width: 250px;
}

.notification-content {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #939db8;
}

.notification-content i {
    color: #8483DE;
    margin-right: 10px;
    font-size: 18px;
}

.notification-timer {
    width: 100%;
    height: 3px;
    background-color: #272A3A;
    border-radius: 3px;
    overflow: hidden;
}

.notification-timer::before {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    background-color: #8483DE;
    animation: countdown 3s linear forwards;
}

@keyframes countdown {
    from { width: 100%; }
    to { width: 0%; }
}

.notification.show {
    transform: translateX(0);
}

/* Animations */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    50% { border-color: transparent }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #939db8;
    white-space: nowrap;
    margin: 0; /* Removed margin: 0 auto which was causing centering issues */
    animation: 
        typing 3s steps(30, end),
        blink 0.75s step-end infinite;
}

.deleting {
    border-right: 2px solid #939db8;
    white-space: nowrap;
    margin: 0; /* Removed margin: 0 auto which was causing centering issues */
    animation: 
        blink 0.75s step-end infinite;
}

.info-container,
.media-container,
.volume-container,
.theme-toggle-container,
.notification,
.typewriter-text,
.track-info,
.notification-content,
.progress-bar-container,
#volume-slider {
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
}

/* Theme toggle container */
.theme-toggle-container {
    position: absolute;
    top: 30px;
    right: 30px;
    background-color: #141521;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    border: 1px solid #272A3A;
    z-index: 10;
}

#theme-toggle-icon {
    color: #8483DE;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s;
}

#theme-toggle-icon:hover {
    transform: scale(1.1);
}

/* Grid animation transition */
.grid-animation::before {
    transition: background 0.5s ease;
}

/* Light Mode Styles */
.light-mode {
    background-color: #f5f5f8;
}

/* Apply light mode to the grid animation */
.light-mode .grid-animation::before {
    background: linear-gradient(rgba(127, 133, 236, 0.2) 1px, transparent 1px), 
                linear-gradient(90deg, rgba(127, 133, 236, 0.2) 1px, transparent 1px);
}

/* Apply light mode to containers */
.light-mode .info-container,
.light-mode .media-container,
.light-mode .volume-container,
.light-mode .theme-toggle-container,
.light-mode .notification {
    background-color: #ffffff;
    border-color: #e1e1e8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Text color in light mode */
.light-mode .typewriter-text,
.light-mode .track-info,
.light-mode .notification-content {
    color: #4a4a68;
}

/* Keep the purple/accent colors the same */
.light-mode .name,
.light-mode #volume-icon,
.light-mode #theme-toggle-icon,
.light-mode .social-icons i,
.light-mode .media-icon-container i,
.light-mode .media-control-buttons i,
.light-mode .notification-content i {
    color: #8483DE; /* Keep the original purple color */
}

/* Progress bar background in light mode */
.light-mode .progress-bar-container {
    background-color: #e1e1e8;
}

/* Ensure the notification timer keeps the same accent color */
.light-mode .notification-timer::before {
    background-color: #8483DE;
}

/* Volume slider in light mode */
.light-mode #volume-slider {
    background: #e1e1e8;
}

/* Cursor styles in light mode - keep the same color */
.light-mode .cursor-dot {
    background-color: #8483DE;
}

.light-mode .cursor-outline {
    border: 2px solid #8483DE;
}

/* Overlay in light mode */
.light-mode #overlay {
    background-color: rgba(245, 245, 248, 0.7);
}

.light-mode .overlay-content {
    color: #4a4a68;
}