/* General Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #ffffff; /* White background for the body */
    color: #333;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    flex-wrap: wrap; /* Ensure the content wraps on smaller screens */
    padding: 0 15px; /* Add padding for better spacing on smaller screens */
}

/* Content (Left Column) */
.content {
    flex: 3;
    padding: 10px;
    background: #ffffff; /* White background */
    margin-right: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 300px; /* Prevent content from shrinking too much */
}

/* Sidebar (Right Column) */
.sidebar {
    flex: 1;
    padding: 10px;
    background: #f4f4f4;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Prevent sidebar from shrinking too much */
}

/* Content Section Styling */
.content-section {
    margin-top: 10px;
    padding: 10px;
    background: #f0f7f7; /* Light teal background */
    border: 2px solid #008080; /* Teal border */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.topic-container {
            margin: 20px auto;
            max-width: 800px;
            background: #fff;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }
        .topic-container h3 {
            margin-bottom: 15px;
            color: #007bff;
        }
        .success-message, .error-message {
            padding: 10px;
            margin-bottom: 15px;
            border-radius: 5px;
        }
        .success-message {
            background: #d4edda;
            color: #155724;
        }
        .error-message {
            background: #f8d7da;
            color: #721c24;
        }
        .submitted-topics table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        .submitted-topics th, .submitted-topics td {
            border: 1px solid #ddd;
            padding: 10px;
            text-align: left;
        }
        .submitted-topics th {
            background: #007bff;
            color: #fff;
        }
        .chosen-label {
            color: #28a745;
            font-weight: bold;
        }

        .hidden-content {
            display: none;
        }
        .button {
            color: #fff;
            background-color: #4CAF50;
            border: none;
            padding: 10px 15px;
            cursor: pointer;
            border-radius: 5px;
        }

        .main-content {
            width: 70%;
            float: left;
        }

        .sidebar {
            width: 30%;
            float: right;
            background-color: #f9f9f9;
            padding: 15px;
            border-left: 1px solid #ddd;
        }

        /* Top Menu Bar */
        .top-menu-bar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background-color: #f8f9fa;
            border-bottom: 1px solid #ddd;
            z-index: 1000;
            box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .menu-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
        }

        .menu-left .logo {
            font-size: 18px;
            font-weight: bold;
            color: #0073b1;
            margin: 0;
        }

        .menu-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .menu-item {
            font-size: 14px;
            color: #333;
            text-decoration: none;
            font-weight: 600;
        }

        .menu-item.notification-icon {
            font-size: 20px;
            cursor: pointer;
        }

        .profile-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 35px;
            height: 35px;
            background-color: #0073b1;
            color: #fff;
            border-radius: 50%;
            font-weight: bold;
            text-decoration: none;
            font-size: 18px;
        }

        .profile-icon:hover {
            background-color: #005580;
        }

        /* Subtle message styling */
        .subtle-message {
            font-size: 0.9rem;
            margin-top: 5px;
            color: #4CAF50; /* Success message color */
            transition: opacity 0.5s ease;
        }

        .subtle-message.error {
            color: #f44336; /* Error message color */
        }

        .subtle-message.success {
            color: #4CAF50; /* Success message color */
        }

                .counter {
            font-size: 0.9rem;
            color: #555;
            margin-top: 5px;
        }

        .counter.error {
            color: #f44336;
        }

        textarea {
            width: 100%;
            margin-bottom: 10px;
        }

        button {
            background-color: #4CAF50;
            color: white;
            padding: 10px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        button:disabled {
            background-color: #ddd;
            cursor: not-allowed;
        }

/* Responsive Design */

/* Medium devices (tablets, 768px and below) */
@media (max-width: 768px) {
    .container {
        flex-direction: column; /* Stack the columns vertically */
    }

    .content, .sidebar {
        flex: 1;
        margin: 10px 0; /* Add margin for spacing */
        max-width: 100%; /* Allow full width */
    }

    .button {
        font-size: 14px; /* Adjust button size for smaller screens */
        padding: 8px 15px;
    }

    .section h2, .gamification h3 {
        font-size: 18px; /* Reduce heading size for smaller screens */
    }

    .quiz-button {
        font-size: 14px; /* Adjust font size for better readability */
    }

    .tarot-result img {
        max-width: 80%; /* Scale image appropriately */
    }

    .avatar-circle {
        width: 60px;
        height: 60px;
        font-size: 20px; /* Adjust avatar size for smaller screens */
    }
}

/* Small devices (phones, 480px and below) */
@media (max-width: 480px) {
    .header {
        padding: 15px;
        font-size: 16px;
        text-align: center; /* Center align for better presentation */
    }

    .content, .sidebar {
        padding: 15px;
        margin: 0; /* Remove margin for better fit */
    }

    .button {
        font-size: 12px;
        padding: 6px 10px;
    }

    .section h2, .gamification h3 {
        font-size: 14px;
    }

    .leaderboard-item {
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start;
    }

    .profile-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .tarot-result img {
        max-width: 100%; /* Ensure full width on smaller screens */
    }

    .interactive-section {
        padding: 15px; /* Adjust padding for better spacing */
    }

    .quiz-button {
        font-size: 12px; /* Reduce font size for smaller buttons */
    }
}

/* Additional Improvements */

/* Ensure tables and forms are scrollable on smaller devices */
table, form {
    width: 100%;
    overflow-x: auto;
}

/* Smooth transitions for hover effects on mobile */
.module-container:hover, .quiz-button:hover, .button:hover {
    transform: none; /* Remove hover transformations for better mobile UX */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* Maintain subtle hover shadow */
}

/* Ensure images do not exceed their containers */
img {
    max-width: 100%;
    height: auto;
}