* {
    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;
    color: #333;
}

.hidden {
    display: none !important;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: #667eea;
    color: white;
}

.lang-btn:hover:not(.active) {
    background: #f8f9fa;
    border-color: #764ba2;
}

.login-box h1 {
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 300;
}

.login-box input {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-box input:focus {
    outline: none;
    border-color: #667eea;
}

.login-box button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.main-app {
    min-height: 100vh;
    background: #f8f9fa;
}

.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.header h1 {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 300;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info .language-selector {
    margin-bottom: 0;
}

.user-info .lang-btn {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

.user-info span {
    font-weight: 500;
    color: #333;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.4);
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
}

.sidebar {
    width: 250px;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: fit-content;
}

.menu-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.menu-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: #666;
    font-size: 1rem;
}

.menu-btn:hover {
    background: #f8f9fa;
    color: #667eea;
}

.menu-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.main-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.content-section h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 300;
}

.post-composer {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.post-composer h3 {
    margin-bottom: 1rem;
    color: #333;
}

.post-composer textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.post-composer textarea:focus {
    outline: none;
    border-color: #667eea;
}

.post-composer button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

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

.post {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.post-author {
    font-weight: 600;
    color: #667eea;
}

.post-time {
    color: #666;
    font-size: 0.9rem;
}

.post-content {
    color: #333;
    line-height: 1.6;
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-container input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
}

.search-container button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

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

.search-result {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-messages {
    flex: 1;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow-y: auto;
    border: 2px solid #e1e5e9;
}

.chat-message {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
}

.message-author {
    font-weight: 600;
    color: #667eea;
}

.message-content {
    margin-left: 0.5rem;
    color: #333;
}

.chat-input-container {
    display: flex;
    gap: 1rem;
}

.chat-input-container input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
}

.chat-input-container input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-input-container button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.chat-input-container button:hover {
    transform: translateY(-2px);
}

.profile-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

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

.tools-container {
    display: grid;
    gap: 1.5rem;
}

.tool-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.tool-item h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.tool-item p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tool-item code {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    display: block;
    word-break: break-all;
}

.learn-container {
    max-width: 800px;
}

.learn-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
}

.learn-section h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.learn-section h5 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.learn-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.learn-section ol, .learn-section ul {
    color: #555;
    line-height: 1.6;
    padding-left: 1.5rem;
}

.learn-section li {
    margin-bottom: 0.5rem;
}

.code-example {
    background: #2c3e50;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.code-example code {
    display: block;
    color: #ecf0f1;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.xss-types {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.xss-type {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.xss-type h5 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.payload-examples {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.payload-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.payload-item h5 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.payload-item code {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    display: block;
    word-break: break-all;
    margin: 0.5rem 0;
}

.payload-item p {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.html-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.html-demo-left, .html-demo-right {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.html-demo h5 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.html-preview {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #e1e5e9;
    min-height: 120px;
}

.js-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.js-demo-left, .js-demo-right {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.js-demo h5 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.run-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.run-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.run-btn:active {
    transform: translateY(0);
}

.terminal {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.terminal-header {
    background: #2d2d2d;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3d3d3d;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-btn.red {
    background: #ff5f56;
}

.terminal-btn.yellow {
    background: #ffbd2e;
}

.terminal-btn.green {
    background: #27ca3f;
}

.terminal-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.terminal-body {
    padding: 1rem;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.terminal-line {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.terminal-prompt {
    color: #4ade80;
    font-weight: bold;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.terminal-text {
    color: #e5e5e5;
    font-size: 0.9rem;
    line-height: 1.4;
}

.terminal-output {
    color: #fbbf24;
}

.terminal-error {
    color: #f87171;
}

.terminal-success {
    color: #4ade80;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .header-content {
        padding: 1rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .chat-input-container {
        flex-direction: column;
    }
    
    .xss-types {
        grid-template-columns: 1fr;
    }
    
    .payload-examples {
        grid-template-columns: 1fr;
    }
    
    .html-demo {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .js-demo {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
