        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(10px);
            overflow: hidden;
        }

        .header {
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            color: white;
            padding: 30px;
            text-align: center;
            position: relative;
        }

        .header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
            pointer-events: none;
        }

        .header h1 {
            font-size: 2.5em;
            font-weight: 700;
            margin-bottom: 10px;
            position: relative;
            z-index: 1;
        }

        .header p {
            font-size: 1.1em;
            opacity: 0.9;
            position: relative;
            z-index: 1;
        }

        .mode-switch {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 2;
        }

        .mode-btn {
            padding: 8px 16px;
            margin: 0 5px;
            border: 2px solid white;
            background: transparent;
            color: white;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
        }

        .mode-btn.active {
            background: white;
            color: #4f46e5;
        }

        .mode-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
        }

        .link-section, .teacher-auth-section {
            background: white;
            padding: 20px;
            margin: 20px 30px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            text-align: center;
            display: none;
        }

        .link-section.active, .teacher-auth-section.active {
            display: block;
        }

        .link-section h2, .teacher-auth-section h2 {
            color: #374151;
            margin-bottom: 15px;
            font-size: 1.4em;
        }

        .link-section input, .teacher-auth-section input {
            width: 80%;
            padding: 12px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 14px;
            margin-bottom: 15px;
            transition: border-color 0.3s ease;
        }

        .link-section input:focus, .teacher-auth-section input:focus {
            outline: none;
            border-color: #4f46e5;
        }

        .link-section button, .teacher-auth-section button {
            padding: 12px 24px;
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 0 10px;
        }

        .link-section button:hover, .teacher-auth-section button:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
        }

        .link-section .generated-link {
            background: #ecfdf5;
            padding: 10px;
            border-radius: 8px;
            font-size: 14px;
            color: #065f46;
            margin-top: 10px;
            word-break: break-all;
        }

        .auth-toggle {
            margin-top: 15px;
            font-size: 14px;
            color: #4f46e5;
            cursor: pointer;
            text-decoration: underline;
        }

        .main-content {
            padding: 30px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            min-height: 600px;
        }

        .question-form {
            background: white;
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            height: fit-content;
            display: none;
        }

        .question-form.active {
            display: block;
        }

        .question-form.disabled {
            opacity: 0.6;
            pointer-events: none;
        }

        .question-form h2 {
            color: #374151;
            margin-bottom: 20px;
            font-size: 1.4em;
        }

        .join-message {
            color: #6b7280;
            font-size: 14px;
            margin-bottom: 20px;
            text-align: center;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #374151;
        }

        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 14px;
            resize: vertical;
            min-height: 100px;
            transition: border-color 0.3s ease;
        }

        .form-group textarea:focus {
            outline: none;
            border-color: #4f46e5;
        }

        .form-group select {
            width: 100%;
            padding: 12px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 14px;
            background: white;
            transition: border-color 0.3s ease;
        }

        .form-group select:focus {
            outline: none;
            border-color: #4f46e5;
        }

        .submit-btn {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, #4f46e5, #7c3aed);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
        }

        .error {
            color: #dc2626;
            font-size: 14px;
            margin-top: 10px;
            display: none;
        }

        .questions-feed {
            background: white;
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            max-height: 70vh;
            overflow-y: auto;
        }

        .feed-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .feed-header h2 {
            color: #374151;
            font-size: 1.4em;
        }

        .filter-select {
            padding: 8px 12px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            background: white;
        }

        .question-item {
            background: #f9fafb;
            padding: 20px;
            margin-bottom: 15px;
            border-radius: 12px;
            border-left: 4px solid #4f46e5;
            transition: all 0.3s ease;
            position: relative;
            animation: slideIn 0.3s ease;
        }

        .question-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .question-text {
            font-size: 15px;
            line-height: 1.5;
            color: #374151;
            margin-bottom: 15px;
        }

        .question-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .question-tag {
            background: #4f46e5;
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }

        .question-time {
            font-size: 12px;
            color: #6b7280;
        }

        .question-actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .upvote-btn {
            background: #e5e7eb;
            border: none;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .upvote-btn:hover {
            background: #d1d5db;
        }

        .upvote-btn.upvoted {
            background: #4f46e5;
            color: white;
        }

        .reply-btn {
            background: #10b981;
            color: white;
            border: none;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .reply-btn:hover {
            background: #059669;
        }

        .reply-section {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #e5e7eb;
            display: none;
        }

        .reply-section.active {
            display: block;
        }

        .reply-form {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
        }

        .reply-input {
            flex: 1;
            padding: 8px 12px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
        }

        .reply-text {
            background: #ecfdf5;
            padding: 10px;
            border-radius: 8px;
            font-size: 14px;
            color: #065f46;
            margin-top: 10px;
        }

        .teacher-dashboard {
            background: white;
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
            display: none;
        }

        .teacher-dashboard.active {
            display: block;
        }

        .teacher-dashboard h2 {
            color: #374151;
            margin-bottom: 20px;
            font-size: 1.4em;
        }

        .teacher-dashboard select, .teacher-dashboard button {
            padding: 8px 12px;
            margin-right: 10px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            background: white;
        }

        .teacher-dashboard button {
            background: #10b981;
            color: white;
            border: none;
            cursor: pointer;
        }

        .teacher-dashboard button:hover {
            background: #059669;
        }

        .empty-state {
            text-align: center;
            color: #6b7280;
            padding: 40px;
        }

        .empty-state svg {
            width: 80px;
            height: 80px;
            margin-bottom: 20px;
            opacity: 0.3;
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @media (max-width: 768px) {
            .main-content {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .header h1 {
                font-size: 2em;
            }

            .mode-switch {
                position: static;
                text-align: center;
                margin-top: 20px;
            }

            .link-section input, .teacher-auth-section input {
                width: 100%;
            }
        }