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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --accent: #ff3333;
    --accent-glow: rgba(255, 51, 51, 0.4);
    --border: rgba(255, 255, 255, 0.08);
    --gradient-dark: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(10, 10, 10, 0.98));
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 51, 51, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 100, 100, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
    pointer-events: none;
}

.bg-character {
    position: fixed;
    top: 0;
    right: -10%;
    width: 70%;
    height: 100%;
    background-image: url('img/heihachi.png');
    background-size: contain;
    background-position: center right;
    background-repeat: no-repeat;
    opacity: 0.4;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 30px 100px;
    min-height: 100vh;
}

.header {
    margin-bottom: 80px;
    position: relative;
}

.header-accent {
    position: absolute;
    top: -20px;
    left: 0;
    width: 3px;
    height: 100px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.title {
    padding-left: 24px;
}

.title-sub {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--accent);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.title-main {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 8vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-main .highlight {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow);
}

.tagline {
    margin-top: 16px;
    padding-left: 24px;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.15em;
}

.log-section {
    position: relative;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.log-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    white-space: nowrap;
}

.log-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}

.log-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.season-divider {
    position: relative;
    margin: 12px 0 10px;
    padding: 0 0 0 28px;
}

.season-divider__line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    opacity: 0.9;
}

.season-divider__body {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px 12px 18px;
    border: 1px solid rgba(255, 51, 51, 0.2);
    background:
        linear-gradient(90deg, rgba(255, 51, 51, 0.12), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.02);
    box-shadow: 0 0 30px rgba(255, 51, 51, 0.08);
    overflow: hidden;
}

.season-divider__body::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 12px var(--accent-glow);
}

.season-divider__body::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 45%);
    pointer-events: none;
}

.season-divider__label,
.season-divider__sublabel {
    position: relative;
    z-index: 1;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
}

.season-divider__label {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text-primary);
}

.season-divider__sublabel {
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.34em;
    color: var(--accent);
}

.log-item {
    position: relative;
    padding: 28px 0 28px 28px;
    border-left: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: default;
}

.log-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 36px;
    width: 7px;
    height: 7px;
    background: var(--bg-primary);
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.log-item:hover {
    background: linear-gradient(to right, rgba(255, 51, 51, 0.02), transparent);
}

.log-item:hover::before {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    background: var(--accent);
}

.log-item:hover .log-border {
    opacity: 1;
}

.log-border {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.log-date {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.log-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.log-result {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.log-result.win {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
    animation: win-pulse 2s infinite ease-in-out;
}

.log-result.loss {
    color: var(--text-secondary);
}

/* Win Animations */
@keyframes win-pulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
        color: #4ade80;
    }
    50% {
        text-shadow: 0 0 20px rgba(74, 222, 128, 0.8), 0 0 30px rgba(74, 222, 128, 0.4);
        color: #8bfeb5;
    }
}

/* Win Item Styles */
.log-item.is-win {
    background: linear-gradient(to right, rgba(74, 222, 128, 0.03), transparent);
    border-left-color: #4ade80;
}

.log-item.is-win .log-border {
    background: linear-gradient(to bottom, transparent, #4ade80, transparent);
    opacity: 0.5;
}

.log-item.is-win::before {
    border-color: #4ade80;
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
    animation: win-dot-pulse 2s infinite;
}

@keyframes win-dot-pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(74, 222, 128, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px rgba(74, 222, 128, 0.8);
        transform: scale(1.3);
    }
}

.log-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.log-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.log-link:hover {
    color: var(--accent);
}

.log-link svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.log-link:hover svg {
    opacity: 1;
}

.loading {
    text-align: center;
    padding: 60px 0;
}

.loading-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@media (max-width: 768px) {
    .bg-character {
        opacity: 0.4;
        width: 100%;
        right: -30%;
    }
    
    .container {
        padding: 40px 20px 80px;
    }
    
    .header {
        margin-bottom: 60px;
    }
    
    .header-accent {
        height: 80px;
    }
    
    .title-sub {
        font-size: 0.6rem;
    }
    
    .tagline {
        font-size: 0.75rem;
    }
    
    .log-item {
        padding: 24px 0 24px 20px;
    }

    .season-divider {
        padding-left: 20px;
    }

    .season-divider__body {
        width: 100%;
        padding: 11px 14px 11px 16px;
    }
    
    .log-name {
        font-size: 1rem;
    }
    
    .log-result {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .bg-character {
        opacity: 0.4;
    }
    
    .container {
        padding: 30px 16px 60px;
    }
    
    .header {
        margin-bottom: 50px;
    }
    
    .log-header {
        margin-bottom: 30px;
    }
    
    .log-item {
        padding: 20px 0 20px 16px;
    }

    .season-divider {
        padding-left: 16px;
        margin: 8px 0;
    }

    .season-divider__label {
        font-size: 0.88rem;
        letter-spacing: 0.14em;
    }

    .season-divider__sublabel {
        font-size: 0.52rem;
        letter-spacing: 0.28em;
    }
    
    .log-item::before {
        left: -3px;
        width: 5px;
        height: 5px;
    }
}

/* Profile Section */
.profile-section {
    margin-bottom: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.profile-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.8));
    pointer-events: none;
}

.profile-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 30px 50px;
}

.profile-group {
    position: relative;
}

.char-group {
    grid-column: 1 / -1;
}

.profile-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-label::after {
    content: '';
    display: block;
    height: 1px;
    width: 30px;
    background: var(--text-muted);
    opacity: 0.3;
}

.profile-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

/* Device List */
.device-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.device-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 12px;
}

.device-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}

/* Character Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    font-size: 0.8rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 2px;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.tag:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.2);
    transform: translateY(-2px);
    background: rgba(255, 51, 51, 0.1);
}

/* Profile Responsive */
@media (max-width: 600px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .device-list {
        flex-direction: column;
        gap: 6px;
    }
    
    .profile-section {
        padding: 24px 20px;
    }
}
