@font-face {
            font-family: 'Midwinter';
            src: url('fonts/Midwinter.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            font-family: 'Midwinter', 'Segoe UI', system-ui, sans-serif;
            background: linear-gradient(135deg, #0a1628 0%, #1a2d4a 50%, #0d1926 100%);
            color: #e0e6ed;
            min-height: 100vh;
            line-height: 1.6;
        }
        
        .nav {
            background: rgba(10, 22, 40, 0.95);
            padding: 1rem 2rem;
            border-bottom: 1px solid rgba(100, 180, 255, 0.2);
        }
        
        .nav-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .nav a {
            font-family: 'Midwinter', sans-serif;
            color: #64b4ff;
            text-decoration: none;
            transition: color 0.2s;
        }
        
        .nav a:hover {
            color: #9dd1ff;
        }
        
        .logo {
            font-family: 'Midwinter', sans-serif;
            font-weight: 700;
            font-size: 1.25rem;
            letter-spacing: 0.05em;
        }
        
        .nav-links {
            display: flex;
            gap: 2rem;
        }
        
        main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
        }
        
        h1 {
            font-family: 'Midwinter', sans-serif;
            text-align: center;
            color: #64b4ff;
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
        }

        .subtitle {
            font-family: 'Midwinter', sans-serif;
            text-align: center;
            color: #8ba4c4;
            margin-bottom: 2rem;
        }
        
        .characters-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1.5rem;
        }
        
        .character-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-decoration: none;
            color: inherit;
            padding: 1rem;
            border-radius: 8px;
            background: rgba(20, 40, 70, 0.3);
            border: 1px solid rgba(100, 180, 255, 0.1);
            transition: all 0.2s;
        }
        
        .character-card:hover {
            background: rgba(30, 60, 100, 0.4);
            border-color: rgba(100, 180, 255, 0.3);
            transform: translateY(-2px);
        }
        
        .portrait-frame {
            width: 100px;
            height: 100px;
            overflow: hidden;
            border: 2px solid rgba(100, 180, 255, 0.3);
            border-radius: 4px;
            margin-bottom: 0.75rem;
            position: relative;
        }

        .portrait {
            width: 100%;
            height: 100%;
            object-fit: cover;
            image-rendering: pixelated;
        }

        /* Portrait cycling for characters with new graphics */
        .portrait-frame.cycling .portrait {
            position: absolute;
            top: 0;
            left: 0;
            transition: opacity 1.5s ease-in-out;
        }

        .portrait-frame.cycling .portrait.old {
            z-index: 1;
        }

        .portrait-frame.cycling .portrait.new {
            z-index: 2;
            opacity: 0;
        }
        
        .character-name {
            font-family: 'Midwinter', sans-serif;
            font-weight: 600;
            font-size: 0.85rem;
            text-align: center;
            color: #64b4ff;
            margin-bottom: 0.25rem;
        }

        .character-location {
            font-family: 'Midwinter', sans-serif;
            font-size: 0.75rem;
            color: #8ba4c4;
            text-align: center;
        }
        
        @media (max-width: 600px) {
            .characters-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }
    /* Mobile */
@media (max-width: 768px) { .content { padding: 1.5rem 1rem; } h1 { font-size: 0.7rem; } .character-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } .character-card { padding: 0.75rem; } .portrait { width: 60px; height: 60px; } .char-name { font-size: 0.4rem; } }
@media (max-width: 480px) { .character-grid { grid-template-columns: 1fr 1fr; } .portrait { width: 50px; height: 50px; } }