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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #1a1a2e, #16213e);
            color: #fff;
            min-height: 100vh;
            padding: 10px;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            margin-bottom: 20px;
        }

        .title {
            font-size: 1.8rem;
            color: #ff6b6b;
            margin-bottom: 10px;
        }

        .card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 20px;
        }

        .input-group {
            margin-bottom: 15px;
        }

        label {
            display: block;
            margin-bottom: 5px;
            font-weight: 600;
            color: #ffd93d;
        }

        input, select, textarea {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            font-size: 16px;
        }

        button {
            background: linear-gradient(45deg, #ff6b6b, #ee5a24);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.2s;
            margin: 5px;
        }

        button:hover {
            transform: translateY(-2px);
        }

        button:disabled {
            background: #666;
            cursor: not-allowed;
            transform: none;
        }

        .messages {
            height: 300px;
            overflow-y: auto;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
        }

        .message {
            margin-bottom: 15px;
            padding: 12px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.1);
        }

        .message.from-storyteller {
            background: rgba(255, 215, 61, 0.2);
            border-left: 4px solid #ffd93d;
        }

        .message.from-player {
            background: rgba(38, 222, 129, 0.2);
            border-left: 4px solid #26de81;
        }

        .message-header {
            font-size: 0.8rem;
            opacity: 0.7;
            margin-bottom: 5px;
        }

        .delivery-status {
            color: #26de81;
            font-size: 0.8rem;
        }

        .template-ui {
            background: rgba(255, 107, 107, 0.2);
            border: 1px dashed #ff6b6b;
            border-radius: 8px;
            padding: 15px;
            margin: 10px 0;
        }

        .template-field {
            margin: 10px 0;
        }

        .response-preview {
            background: rgba(38, 222, 129, 0.2);
            border: 1px solid #26de81;
            border-radius: 6px;
            padding: 10px;
            margin: 10px 0;
            font-style: italic;
        }

        .compose-area {
            display: flex;
            gap: 10px;
            align-items: flex-end;
        }

        .compose-area textarea {
            flex: 1;
            min-height: 50px;
            resize: vertical;
        }

        .compose-area button {
            margin: 0;
            min-width: 80px;
        }

        .storyteller-controls {
            background: rgba(255, 215, 61, 0.1);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
        }

        .template-buttons {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 10px;
            margin-top: 10px;
        }

        .template-btn {
            background: rgba(255, 215, 61, 0.3);
            border: 1px solid #ffd93d;
            color: #ffd93d;
            padding: 10px;
            font-size: 0.9rem;
        }

        .template-btn:hover {
            background: rgba(255, 215, 61, 0.5);
        }

        .players-list {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 10px;
            margin: 15px 0;
        }

        .player-card {
            background: rgba(255, 255, 255, 0.1);
            padding: 10px;
            border-radius: 8px;
            text-align: center;
            border: 2px solid transparent;
        }

        .player-card .seat-num {
            font-size: 0.7rem;
        }

        .player-card .player-name {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .player-card .player-role {
            font-size: 0.8rem;
            opacity: 0.8;
            margin-bottom: 5px;
        }

        .player-card .role-none {
            color: #9e9e9e;
            font-style: italic;
        }

        .player-card .role-townsfolk {
            color: #4a90e2;
        }

        .player-card .role-outsider {
            color: #cccccc;
        }

        .player-card .role-minion {
            color: #ff7755;
        }

        .player-card .role-demon {
            color: #ff4444;
        }

        .player-card.storyteller-view:hover {
            cursor: pointer;
            background: rgba(255, 255, 255, 0.2);
        }

        .player-card.storyteller {
            border-color: #ffd93d;
        }

        .player-card.online {
            border-color: #26de81;
        }

        .role-assignment-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .role-assignment-content {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            max-width: 400px;
            width: 90%;
        }

        .status {
            text-align: center;
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 15px;
        }

        .status.connected {
            background: rgba(38, 222, 129, 0.2);
            color: #26de81;
        }

        .status.disconnected {
            background: rgba(255, 107, 107, 0.2);
            color: #ff6b6b;
        }

        .script-viewer-content {
            max-height: 400px;
            overflow-y: auto;
        }

        .team-section {
            margin: 20px 0;
        }

        .team-header {
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 10px;
            padding: 8px 12px;
            border-radius: 6px;
            text-align: center;
        }

        .team-townsfolk {
            background: rgba(74, 144, 226, 0.3);
            color: #4a90e2;
        }

        .team-outsider {
            background: rgba(158, 158, 158, 0.3);
            color: #9e9e9e;
        }

        .team-minion {
            background: rgba(255, 107, 107, 0.3);
            color: #ff6b6b;
        }

        .team-demon {
            background: rgba(139, 0, 0, 0.3);
            color: #8b0000;
        }

        .role-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 12px;
            margin: 8px 0;
            border-left: 4px solid;
        }

        .role-card.townsfolk {
            border-left-color: #4a90e2;
        }

        .role-card.outsider {
            border-left-color: #9e9e9e;
        }

        .role-card.minion {
            border-left-color: #ff6b6b;
        }

        .role-card.demon {
            border-left-color: #8b0000;
        }

        .role-name {
            font-weight: bold;
            font-size: 1.1rem;
            margin-bottom: 5px;
        }

        .role-ability {
            font-size: 0.9rem;
            line-height: 1.4;
            opacity: 0.9;
        }

        .hidden {
            display: none;
        }

        .role-selection-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 10px;
            margin: 15px 0;
        }

        .role-selection-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 12px;
            border: 2px solid transparent;
            cursor: pointer;
            transition: all 0.2s;
        }

        .role-selection-card:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .role-selection-card.selected {
            border-color: #26de81;
            background: rgba(38, 222, 129, 0.2);
        }

        .role-selection-card.townsfolk {
            border-left: 4px solid #4a90e2;
        }

        .role-selection-card.outsider {
            border-left: 4px solid #9e9e9e;
        }

        .role-selection-card.minion {
            border-left: 4px solid #ff6b6b;
        }

        .role-selection-card.demon {
            border-left: 4px solid #8b0000;
        }

        .role-selection-name {
            font-weight: bold;
            margin-bottom: 5px;
        }

        .role-selection-ability {
            font-size: 0.8rem;
            opacity: 0.8;
            line-height: 1.3;
        }

        .distribution-match {
            color: #26de81;
        }

        .distribution-over {
            color: #ff6b6b;
        }

        .distribution-under {
            color: #ffd93d;
        }

        @media (max-width: 600px) {
            .compose-area {
                flex-direction: column;
            }

            .compose-area button {
                width: 100%;
            }
        }
