* {
    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;
    transition: background 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(180deg);
}

/* Back Link */
.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Container */
.container {
    max-width: 900px;
    margin: 80px auto 40px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.8s ease-in-out;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

/* Form Section */
.form-section {
    margin-bottom: 50px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #444;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea-wrapper {
    position: relative;
}

.form-group textarea {
    width: 100%;
    padding: 12px 60px 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.voice-btn-inline {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-btn-inline:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.voice-btn-inline.listening {
    animation: pulse 1.5s infinite;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.voice-status {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
}

.voice-status.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    font-weight: bold;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* Comments Section */
.comments-section h2 {
    color: #444;
    font-size: 1.8em;
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #667eea;
    animation: slideIn 0.5s ease-out;
    transition: all 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.comment-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-author {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1em;
}

.comment-date {
    color: #999;
    font-size: 0.9em;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    font-size: 1em;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 1.2em;
}

/* Dark Mode */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .container {
    background: #0f3460;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.dark-mode .page-header h1 {
    background: linear-gradient(135deg, #e94560 0%, #f39c12 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode .subtitle,
body.dark-mode .form-group label {
    color: #bbb;
}

body.dark-mode .page-header {
    border-bottom-color: #2a4a6a;
}

body.dark-mode .form-group input[type="text"],
body.dark-mode .form-group textarea {
    background: #16213e;
    border-color: #2a4a6a;
    color: #e0e0e0;
}

body.dark-mode .form-group input[type="text"]:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

body.dark-mode .voice-btn-inline {
    background: linear-gradient(135deg, #e94560 0%, #f39c12 100%);
}

body.dark-mode .voice-btn-inline.listening {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body.dark-mode .voice-status {
    background: #16213e;
    color: #bbb;
}

body.dark-mode .voice-status.active {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.1) 0%, rgba(243, 156, 18, 0.1) 100%);
    color: #e94560;
}

body.dark-mode .submit-btn {
    background: linear-gradient(135deg, #e94560 0%, #f39c12 100%);
}

body.dark-mode .submit-btn:hover {
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

body.dark-mode .comments-section h2 {
    color: #e0e0e0;
}

body.dark-mode .comment-card {
    background: #16213e;
    border-left-color: #e94560;
}

body.dark-mode .comment-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .comment-author {
    color: #e94560;
}

body.dark-mode .comment-date {
    color: #888;
}

body.dark-mode .comment-text {
    color: #ccc;
}

body.dark-mode .empty-state {
    color: #888;
}

body.dark-mode .theme-toggle {
    background: #0f3460;
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
}

body.dark-mode .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-180deg);
}

body.dark-mode .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

body.dark-mode .back-link {
    background: #0f3460;
    color: #e94560;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
        margin: 60px 10px 20px;
    }

    .page-header h1 {
        font-size: 2em;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
