:root {
    --cosmic-primary: #8a4fff;
    --cosmic-secondary: #2dffb6;
    --cosmic-tertiary: #ff6b6b;
    --code-bg: #0c0f1a;
    --code-text: #e6eef8;
    --code-comment: #5f7e97;
    --code-keyword: #ff7edb;
    --code-string: #2dffb6;
    --code-function: #4da6ff;
    --terminal-bg: rgba(10, 12, 22, 0.95);
    --terminal-border: rgba(138, 79, 255, 0.3);
    --terminal-header: rgba(20, 22, 40, 0.9);
  }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: radial-gradient(circle at top, #05050a, #0b0b0d);
    color: var(--code-text);
    font-family: 'Source Code Pro', monospace;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
      radial-gradient(circle at 20% 30%, rgba(138, 79, 255, 0.1) 0px, transparent 2px),
      radial-gradient(circle at 80% 70%, rgba(45, 255, 182, 0.1) 0px, transparent 2px),
      radial-gradient(circle at 50% 20%, rgba(255, 107, 107, 0.1) 0px, transparent 3px);
    background-size: 300px 300px;
    z-index: -1;
    animation: stars 60s linear infinite;
}
@keyframes stars {
    from { background-position: 0 0; }
    to { background-position: 300px 300px; }
}
.cosmic-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.ide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(15, 18, 32, 0.8);
    border-bottom: 1px solid var(--terminal-border);
    border-radius: 10px 10px 0 0;
    margin-bottom: 5px;
}
.avatar-container {
    display: flex;
    align-items: center;
    gap: 20px;
}
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cosmic-primary);
    box-shadow: 0 0 20px rgba(138, 79, 255, 0.7);
}
.nickname {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cosmic-primary);
    text-shadow: 0 0 10px rgba(138, 79, 255, 0.5);
    letter-spacing: -0.5px;
}
.lang-toggle {
    background: rgba(138, 79, 255, 0.2);
    border: 1px solid var(--cosmic-primary);
    color: var(--code-text);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.lang-toggle:hover {
    background: rgba(138, 79, 255, 0.3);
    box-shadow: 0 0 10px rgba(138, 79, 255, 0.4);
}
.ide-nav {
    display: flex;
    background: rgba(15, 18, 32, 0.8);
    border-bottom: 1px solid var(--terminal-border);
    padding: 0 20px;
    border-radius: 0 0 10px 10px;
    margin-bottom: 25px;
}
.nav-tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}
.nav-tab.active {
    border-bottom: 3px solid var(--cosmic-primary);
    color: var(--cosmic-secondary);
}
.nav-tab:hover:not(.active) {
    background: rgba(138, 79, 255, 0.1);
}
.ide-content {
    background: rgba(15, 18, 32, 0.7);
    border: 1px solid var(--terminal-border);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}
.ide-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
      linear-gradient(90deg, transparent 50%, rgba(138, 79, 255, 0.03) 50%),
      linear-gradient(transparent 50%, rgba(138, 79, 255, 0.03) 50%);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
}
.tab-content {
    display: none;
    position: relative;
    z-index: 1;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.about-section .code-block {
    background: var(--code-bg);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--cosmic-primary);
    overflow: auto;
}
.code-line {
    display: flex;
    margin-bottom: 8px;
}
.line-number {
    min-width: 40px;
    color: var(--code-comment);
    user-select: none;
}
.code-content {
    flex: 1;
}
.code-comment {
    color: var(--code-comment);
}
.code-keyword {
    color: var(--code-keyword);
}
.code-string {
    color: var(--code-string);
}
.code-function {
    color: var(--code-function);
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.project-card {
    background: rgba(20, 23, 42, 0.7);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}
.project-card.status-alive::before {
    background: var(--cosmic-secondary);
}
.project-card.status-dead::before {
    background: var(--cosmic-tertiary);
}
.project-card.status-sub::before {
    background: #ffd86b;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--cosmic-primary);
}
.project-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--cosmic-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.project-title i {
    font-size: 1.1rem;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.tech-tag {
    background: rgba(138, 79, 255, 0.2);
    color: var(--cosmic-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}
.project-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 10px;
}
.status-alive-badge {
    background: rgba(45, 255, 182, 0.2);
    color: var(--cosmic-secondary);
}
.status-dead-badge {
    background: rgba(255, 107, 107, 0.2);
    color: var(--cosmic-tertiary);
}
.status-sub-badge {
    background: rgba(255, 216, 107, 0.2);
    color: #ffd86b;
}
.lyrics-container {
    background: var(--code-bg);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--terminal-border);
    max-height: 400px;
    overflow-y: auto;
}
.lyrics-line {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(138, 79, 255, 0.2);
    font-family: 'Montserrat Alternates', sans-serif;
    line-height: 1.8;
}
.japanese-text {
    color: var(--code-keyword);
    font-style: italic;
}
.quote-button {
    background: rgba(138, 79, 255, 0.2);
    border: 1px solid var(--cosmic-primary);
    color: var(--code-text);
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Source Code Pro', monospace;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto;
    width: fit-content;
}
.quote-button:hover {
    background: rgba(138, 79, 255, 0.3);
    box-shadow: 0 0 15px rgba(138, 79, 255, 0.4);
}
.quote-display {
    text-align: center;
    padding: 20px;
    font-size: 1.2rem;
    color: var(--cosmic-secondary);
    font-style: italic;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--terminal-border);
    border-radius: 8px;
    margin: 20px 0;
    background: rgba(10, 12, 22, 0.5);
}
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    background: var(--terminal-header);
    color: var(--code-text);
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-left: 4px solid var(--cosmic-primary);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(100%);
    opacity: 0;
    animation: slideIn 0.3s forwards, fadeOut 0.5s forwards 2.5s;
}
@keyframes slideIn {
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    to { opacity: 0; }
}
.toast i {
    font-size: 1.5rem;
    color: var(--cosmic-primary);
}
.cosmic-footer {
    text-align: center;
    padding: 20px;
    color: var(--code-comment);
    font-size: 0.9rem;
    margin-top: 30px;
}
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .ide-nav {
        flex-wrap: wrap;
    }
    .avatar-container {
        flex-direction: column;
        text-align: center;
    }
}
#cosmic-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #05050a, #0b0b0d);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.cosmic-loader {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
}
.orbiting-planet {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8a4fff;
    box-shadow: 0 0 15px rgba(138, 79, 255, 0.7);
    transform: translate(-50%, -50%);
    animation: orbit 4s linear infinite;
}
.planet-1 { animation-delay: 0s; background: #ff6b6b; }
.planet-2 { animation-delay: -1s; background: #2dffb6; }
.planet-3 { animation-delay: -2s; background: #ffd86b; }
.planet-4 { animation-delay: -3s; background: #4da6ff; }
@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(80px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(80px) rotate(-360deg);
    }
}
.loading-text {
    color: #e6eef8;
    font-size: 1.5rem;
    text-align: center;
}
.loading-progress {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8a4fff, #2dffb6);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.track-card {
    background: rgba(20, 23, 42, 0.7);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.track-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--cosmic-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.track-title i {
    color: var(--cosmic-primary);
}
.audio-player {
    width: 100%;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 8px;
}
.audio-player::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}
.audio-player::-webkit-media-controls-play-button {
    background-color: var(--cosmic-primary);
    border-radius: 50%;
}
.audio-player::-webkit-media-controls-current-time-display,
.audio-player::-webkit-media-controls-time-remaining-display {
    color: var(--code-text);
}
.audio-player::-webkit-media-controls-timeline {
    background-color: rgba(138, 79, 255, 0.3);
    border-radius: 10px;
}
.audio-player::-webkit-media-controls-volume-slider {
    background-color: rgba(45, 255, 182, 0.3);
    border-radius: 10px;
}
.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.track-card {
    background: rgba(20, 23, 42, 0.7);
    border: 1px solid rgba(138, 79, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}
.track-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(138, 79, 255, 0.3);
    border-color: rgba(138, 79, 255, 0.5);
}
.track-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.track-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8a4fff, #2dffb6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 15px rgba(138, 79, 255, 0.5);
}
.track-title {
    font-size: 1.3rem;
    color: var(--cosmic-secondary);
    font-weight: 600;
    margin-bottom: 5px;
}
.track-info {
    color: var(--code-comment);
    font-size: 0.9rem;
}
.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}
.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8a4fff, #2dffb6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(138, 79, 255, 0.5);
    transition: all 0.3s ease;
}
.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(138, 79, 255, 0.7);
}
.play-btn i {
    color: #0c0f1a;
    font-size: 1.2rem;
    margin-left: 3px;
}
.progress-container {
    flex: 1;
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8a4fff, #2dffb6);
    border-radius: 3px;
    position: relative;
    transition: width 0.1s linear;
}
.progress-bar::after {
    content: '';
    position: absolute;
    top: -3px;
    right: 0;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(138, 79, 255, 0.8);
}
.time-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--code-comment);
}
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}
.volume-icon {
    color: var(--cosmic-primary);
    font-size: 1.1rem;
}
.volume-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}
.volume-level {
    height: 100%;
    width: 80%;
    background: linear-gradient(90deg, #8a4fff, #2dffb6);
    border-radius: 3px;
}
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    overflow: hidden;
    z-index: -1;
}
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 30px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 10" xmlns="http://www.w3.org/2000/svg"><path d="M0,5 Q25,10 50,5 T100,5" fill="none" stroke="rgba(138,79,255,0.1)" stroke-width="0.5"/></svg>') repeat-x;
    background-size: 100px 10px;
    animation: wave-animation 20s linear infinite;
}
@keyframes wave-animation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.wave-2 {
    animation-duration: 15s;
    opacity: 0.7;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 10" xmlns="http://www.w3.org/2000/svg"><path d="M0,7 Q25,2 50,7 T100,7" fill="none" stroke="rgba(45,255,182,0.1)" stroke-width="0.5"/></svg>') repeat-x;
    background-size: 100px 10px;
}
.track-card.playing .wave-container {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.6; }
    100% { opacity: 0.3; }
}