/*
Theme Name: CodeMastery Pro
Theme URI: https://codemastery.com
Author: CodeMastery Team
Author URI: https://codemastery.com
Description: A modern, professional WordPress theme for programming education websites. Fully compatible with Elementor. Features include interactive code editor, course management, tutorial system, and user authentication.
Version: 2.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: codemastery-pro
Tags: education, programming, coding, tutorials, courses, responsive, dark-mode, elementor
*/

/* ================================
   CSS VARIABLES & RESET
   ================================ */
:root {
    /* Brand Colors */
    --cm-dark: #1d1d1d;
    --cm-darker: #282a35;
    --cm-green: #04aa6d;
    --cm-pink: #ffc0c7;
    --cm-yellow: #fff4a3;
    --cm-blue: #96d4d4;
    --cm-light: #f1f1f1;
    --cm-white: #ffffff;
    --cm-black: #000000;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #1d1d1d 0%, #282a35 100%);
    --gradient-green: linear-gradient(135deg, #04aa6d 0%, #038857 100%);
    --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(4, 170, 109, 0.4);
    
    /* Typography */
    --font-primary: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', monospace;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-max: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--cm-dark);
    color: var(--cm-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ================================
   UTILITY CLASSES
   ================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: var(--section-padding);
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-green);
    color: var(--cm-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: var(--cm-white);
}

.btn-secondary {
    background: var(--cm-yellow);
    color: var(--cm-black);
}

.btn-secondary:hover {
    background: #ffe066;
    transform: translateY(-2px);
    color: var(--cm-black);
}

.btn-outline {
    border: 2px solid var(--cm-green);
    color: var(--cm-green);
    background: transparent;
}

.btn-outline:hover {
    background: var(--cm-green);
    color: var(--cm-white);
}

.btn-dark {
    background: var(--cm-darker);
    color: var(--cm-white);
}

.btn-dark:hover {
    background: var(--cm-dark);
    color: var(--cm-white);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--cm-white);
}

.section-header p {
    font-size: 1.1rem;
    color: rgba(241, 241, 241, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--cm-darker);
    border-radius: 16px;
    padding: 30px;
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(4, 170, 109, 0.3);
}

/* Tags */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tag-green {
    background: rgba(4, 170, 109, 0.2);
    color: var(--cm-green);
}

.tag-pink {
    background: rgba(255, 192, 199, 0.2);
    color: var(--cm-pink);
}

.tag-yellow {
    background: rgba(255, 244, 163, 0.2);
    color: var(--cm-yellow);
}

.tag-blue {
    background: rgba(150, 212, 212, 0.2);
    color: var(--cm-blue);
}

/* ================================
   HEADER & NAVIGATION
   ================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(29, 29, 29, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-normal);
}

.site-header.scrolled {
    background: rgba(29, 29, 29, 0.98);
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cm-white);
}

.site-logo:hover {
    color: var(--cm-green);
}

.site-logo svg {
    width: 40px;
    height: 40px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    color: var(--cm-light);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cm-green);
    transition: var(--transition-normal);
}

.main-nav a:hover {
    color: var(--cm-green);
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav .current-menu-item a {
    color: var(--cm-green);
}

.main-nav .current-menu-item a::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cm-light);
    transition: var(--transition-normal);
}

.search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cm-green);
}

/* Language Bar */
.language-bar {
    background: var(--cm-darker);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 0;
    margin-top: 70px;
    overflow-x: auto;
    scrollbar-width: none;
}

.language-bar::-webkit-scrollbar {
    display: none;
}

.language-bar-inner {
    display: flex;
    gap: 25px;
    white-space: nowrap;
}

.language-bar a {
    color: rgba(241, 241, 241, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

.language-bar a:hover {
    color: var(--cm-green);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--cm-light);
    transition: var(--transition-normal);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Panel */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--cm-darker);
    padding: 20px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu a {
    color: var(--cm-light);
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu a:hover {
    color: var(--cm-green);
}

/* ================================
   HERO SECTION
   ================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
    padding-top: 120px;
}

/* Particle Canvas */
.particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    color: var(--cm-white);
    margin-bottom: 20px;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-title span {
    color: var(--cm-green);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(241, 241, 241, 0.8);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

/* Search Box */
.hero-search {
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-search input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--cm-white);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.hero-search input::placeholder {
    color: rgba(241, 241, 241, 0.5);
}

.hero-search input:focus {
    outline: none;
    border-color: var(--cm-green);
    box-shadow: var(--shadow-glow);
}

.hero-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--cm-green);
    color: var(--cm-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
}

.hero-search button:hover {
    background: #038857;
    transform: translateY(-50%) scale(1.05);
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-cta a {
    color: var(--cm-yellow);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hero-cta a:hover {
    color: var(--cm-green);
}

/* ================================
   LANGUAGE RIBBON
   ================================ */
.language-ribbon {
    background: var(--cm-darker);
    padding: 30px 0;
    overflow: hidden;
}

.ribbon-track {
    display: flex;
    gap: 30px;
    animation: scroll 30s linear infinite;
}

.ribbon-track:hover {
    animation-play-state: paused;
}

.ribbon-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-normal);
    cursor: pointer;
}

.ribbon-item:hover {
    background: rgba(4, 170, 109, 0.1);
    border-color: var(--cm-green);
    transform: scale(1.05);
}

.ribbon-item svg {
    width: 30px;
    height: 30px;
}

.ribbon-item span {
    font-weight: 600;
    color: var(--cm-white);
}

/* ================================
   TUTORIALS SECTION
   ================================ */
.tutorials-section {
    background: var(--cm-dark);
    padding: var(--section-padding);
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.tutorial-card {
    background: var(--cm-darker);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tutorial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cm-green);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.tutorial-card:hover::before {
    transform: scaleX(1);
}

.tutorial-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.tutorial-card.html-card::before {
    background: #e34c26;
}

.tutorial-card.css-card::before {
    background: #264de4;
}

.tutorial-card.js-card::before {
    background: #f7df1e;
}

.tutorial-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.tutorial-icon svg {
    width: 40px;
    height: 40px;
}

.tutorial-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cm-white);
    margin-bottom: 15px;
}

.tutorial-card p {
    color: rgba(241, 241, 241, 0.7);
    margin-bottom: 25px;
    line-height: 1.7;
}

.tutorial-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tutorial-actions .btn {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* Code Preview Window */
.code-preview {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    overflow-x: auto;
}

.code-preview-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.code-preview-header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-preview-header span:nth-child(1) { background: #ff5f56; }
.code-preview-header span:nth-child(2) { background: #ffbd2e; }
.code-preview-header span:nth-child(3) { background: #27c93f; }

.code-preview code {
    color: #d4d4d4;
    line-height: 1.8;
}

.code-preview .tag { color: #569cd6; }
.code-preview .attr { color: #9cdcfe; }
.code-preview .string { color: #ce9178; }
.code-preview .comment { color: #6a9955; }

/* ================================
   COURSES SECTION
   ================================ */
.courses-section {
    background: var(--cm-darker);
    padding: var(--section-padding);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.course-card {
    background: var(--cm-dark);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(4, 170, 109, 0.3);
}

.course-card a {
    display: block;
    text-decoration: none;
}

.course-image {
    height: 160px;
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.course-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-image svg {
    width: 60px;
    height: 60px;
    z-index: 1;
}

.course-content {
    padding: 25px;
}

.course-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.course-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cm-white);
    margin-bottom: 10px;
    transition: var(--transition-fast);
}

.course-card:hover .course-content h4 {
    color: var(--cm-green);
}

.course-content p {
    font-size: 0.9rem;
    color: rgba(241, 241, 241, 0.6);
    margin-bottom: 20px;
    line-height: 1.6;
}

.course-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.course-meta span {
    font-size: 0.8rem;
    color: rgba(241, 241, 241, 0.5);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ================================
   CODE EDITOR SECTION
   ================================ */
.editor-section {
    background: var(--cm-dark);
    padding: var(--section-padding);
    position: relative;
}

.editor-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.editor-window {
    background: #1e1e1e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-header {
    background: #2d2d2d;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.editor-dots {
    display: flex;
    gap: 8px;
}

.editor-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.editor-dots span:nth-child(1) { background: #ff5f56; }
.editor-dots span:nth-child(2) { background: #ffbd2e; }
.editor-dots span:nth-child(3) { background: #27c93f; }

.editor-tabs {
    display: flex;
    gap: 5px;
}

.editor-tab {
    padding: 8px 16px;
    background: #1e1e1e;
    border-radius: 6px 6px 0 0;
    font-size: 0.8rem;
    color: #858585;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.editor-tab:hover {
    color: var(--cm-white);
}

.editor-tab.active {
    color: var(--cm-white);
    background: #1e1e1e;
}

.editor-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.editor-code {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
    overflow: auto;
}

.editor-code .line-number {
    color: #858585;
    margin-right: 15px;
    user-select: none;
}

.editor-preview {
    background: var(--cm-white);
    padding: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-preview h1 {
    color: var(--cm-black);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.editor-preview p {
    color: #333;
}

/* ================================
   STATS SECTION
   ================================ */
.stats-section {
    background: var(--cm-darker);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--cm-green);
    margin-bottom: 10px;
}

.stat-item p {
    color: rgba(241, 241, 241, 0.7);
    font-size: 1rem;
}

/* ================================
   PRO SECTION
   ================================ */
.pro-section {
    background: var(--cm-dark);
    padding: var(--section-padding);
}

.pro-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 24px;
    padding: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pro-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 215, 0, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

.pro-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: var(--cm-black);
    font-weight: 700;
    border-radius: 25px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.pro-card h2 {
    font-size: 2.5rem;
    color: var(--cm-white);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.pro-card p {
    color: rgba(241, 241, 241, 0.7);
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 1;
}

/* ================================
   PAGE HEADER
   ================================ */
.page-header {
    background: var(--gradient-hero);
    padding: 150px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-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"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 50px 50px;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--cm-white);
    margin-bottom: 15px;
    font-weight: 800;
}

.page-header p {
    color: rgba(241, 241, 241, 0.7);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 20px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(241, 241, 241, 0.5);
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--cm-green);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .current {
    color: rgba(241, 241, 241, 0.7);
}

/* ================================
   SINGLE CONTENT
   ================================ */
.single-content {
    padding: 60px 0;
    background: var(--cm-dark);
}

.single-content-inner {
    max-width: 800px;
    margin: 0 auto;
}

.single-content-inner h2,
.single-content-inner h3,
.single-content-inner h4 {
    color: var(--cm-white);
    margin: 30px 0 15px;
}

.single-content-inner p {
    color: rgba(241, 241, 241, 0.8);
    margin-bottom: 20px;
    line-height: 1.8;
}

.single-content-inner ul,
.single-content-inner ol {
    margin: 20px 0;
    padding-left: 30px;
}

.single-content-inner ul {
    list-style: disc;
}

.single-content-inner ol {
    list-style: decimal;
}

.single-content-inner li {
    color: rgba(241, 241, 241, 0.8);
    margin-bottom: 10px;
}

.single-content-inner a {
    color: var(--cm-green);
    text-decoration: underline;
}

.single-content-inner a:hover {
    color: var(--cm-yellow);
}

.single-content-inner code {
    background: var(--cm-darker);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--cm-pink);
}

.single-content-inner pre {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
}

.single-content-inner pre code {
    background: none;
    padding: 0;
    color: #d4d4d4;
}

.single-content-inner blockquote {
    border-left: 4px solid var(--cm-green);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: rgba(241, 241, 241, 0.7);
}

/* ================================
   SINGLE HEADER
   ================================ */
.single-header {
    background: var(--gradient-hero);
    padding: 150px 0 60px;
    position: relative;
}

.single-header-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.single-header .tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.single-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--cm-white);
    margin-bottom: 20px;
}

.single-meta {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
    color: rgba(241, 241, 241, 0.6);
}

.single-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================
   FEATURED IMAGE
   ================================ */
.featured-image-section {
    padding: 40px 0;
    background: var(--cm-dark);
}

.featured-image-section img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
}

/* ================================
   RELATED CONTENT
   ================================ */
.related-content {
    background: var(--cm-darker);
    padding: 60px 0;
}

.related-content h2 {
    text-align: center;
    color: var(--cm-white);
    margin-bottom: 40px;
}

/* ================================
   PAGINATION
   ================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: var(--cm-darker);
    color: var(--cm-light);
    font-weight: 600;
    transition: var(--transition-fast);
}

.pagination a:hover {
    background: var(--cm-green);
    color: var(--cm-white);
}

.pagination .current {
    background: var(--cm-green);
    color: var(--cm-white);
}

/* ================================
   SEARCH MODAL
   ================================ */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-inner {
    width: 100%;
    max-width: 700px;
    padding: 20px;
    position: relative;
}

.search-close {
    position: absolute;
    top: -50px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--cm-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.search-close:hover {
    background: var(--cm-green);
}

.search-modal form {
    position: relative;
}

.search-modal input {
    width: 100%;
    padding: 20px 60px 20px 25px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: var(--cm-darker);
    color: var(--cm-white);
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.search-modal input:focus {
    outline: none;
    border-color: var(--cm-green);
}

.search-modal button[type="submit"] {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--cm-green);
    color: var(--cm-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.search-modal button[type="submit"]:hover {
    background: #038857;
}

.search-results {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px 20px;
    background: var(--cm-darker);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: var(--transition-fast);
}

.search-result-item:hover {
    background: rgba(4, 170, 109, 0.1);
}

.search-result-item a {
    display: block;
}

.search-result-item h4 {
    color: var(--cm-white);
    margin-bottom: 5px;
}

.search-result-item p {
    color: rgba(241, 241, 241, 0.6);
    font-size: 0.9rem;
}

.search-result-item .type {
    display: inline-block;
    padding: 2px 10px;
    background: var(--cm-green);
    color: var(--cm-white);
    border-radius: 20px;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

/* ================================
   AUTH PAGES (LOGIN/REGISTER)
   ================================ */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: 100px 20px;
}

.auth-card {
    background: var(--cm-darker);
    border-radius: 24px;
    padding: 50px;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-card .site-logo {
    justify-content: center;
    margin-bottom: 30px;
}

.auth-card h2 {
    text-align: center;
    color: var(--cm-white);
    margin-bottom: 10px;
}

.auth-card .subtitle {
    text-align: center;
    color: rgba(241, 241, 241, 0.6);
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    color: var(--cm-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: var(--cm-dark);
    color: var(--cm-white);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--cm-green);
}

.auth-form input::placeholder {
    color: rgba(241, 241, 241, 0.4);
}

.auth-form .btn {
    width: 100%;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-footer p {
    color: rgba(241, 241, 241, 0.6);
}

.auth-footer a {
    color: var(--cm-green);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ================================
   CONTACT PAGE
   ================================ */
.contact-section {
    padding: 60px 0;
    background: var(--cm-dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    color: var(--cm-white);
    margin-bottom: 20px;
}

.contact-info p {
    color: rgba(241, 241, 241, 0.7);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--cm-green);
    flex-shrink: 0;
}

.contact-item h4 {
    color: var(--cm-white);
    margin-bottom: 5px;
}

.contact-item p {
    color: rgba(241, 241, 241, 0.6);
    margin: 0;
}

.contact-form {
    background: var(--cm-darker);
    padding: 40px;
    border-radius: 20px;
}

.contact-form h3 {
    color: var(--cm-white);
    margin-bottom: 25px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    color: var(--cm-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: var(--cm-dark);
    color: var(--cm-white);
    font-size: 1rem;
    transition: var(--transition-fast);
    font-family: inherit;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--cm-green);
}

/* ================================
   CODE PLAYGROUND
   ================================ */
.playground-section {
    padding: 100px 0 60px;
    background: var(--cm-dark);
    min-height: 100vh;
}

.playground-header {
    margin-bottom: 30px;
}

.playground-header h2 {
    color: var(--cm-white);
    margin-bottom: 10px;
}

.playground-header p {
    color: rgba(241, 241, 241, 0.6);
}

.playground-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 250px);
    min-height: 500px;
}

.playground-editor,
.playground-output {
    background: #1e1e1e;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.playground-editor-header,
.playground-output-header {
    background: #2d2d2d;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.playground-editor-header span,
.playground-output-header span {
    color: rgba(241, 241, 241, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.playground-editor textarea {
    width: 100%;
    height: calc(100% - 50px);
    padding: 20px;
    background: #1e1e1e;
    border: none;
    color: #d4d4d4;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.8;
    resize: none;
    outline: none;
}

.playground-output iframe {
    width: 100%;
    height: calc(100% - 50px);
    border: none;
    background: var(--cm-white);
}

.playground-actions {
    display: flex;
    gap: 10px;
}

.playground-actions .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* ================================
   FOOTER
   ================================ */
.site-footer {
    background: var(--cm-darker);
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: rgba(241, 241, 241, 0.6);
    margin: 20px 0;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.footer-social a:hover {
    background: var(--cm-green);
    transform: translateY(-3px);
}

.footer-links h4 {
    color: var(--cm-white);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(241, 241, 241, 0.6);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--cm-green);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: rgba(241, 241, 241, 0.5);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-links a {
    color: rgba(241, 241, 241, 0.5);
    font-size: 0.9rem;
}

.footer-bottom-links a:hover {
    color: var(--cm-green);
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .editor-body {
        grid-template-columns: 1fr;
    }
    
    .editor-preview {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .playground-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .playground-editor,
    .playground-output {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-actions .btn {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .tutorials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .pro-card {
        padding: 40px 25px;
    }
    
    .pro-card h2 {
        font-size: 1.75rem;
    }
    
    .auth-card {
        padding: 30px 25px;
    }
    
    .contact-form {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .tutorial-actions {
        flex-direction: column;
    }
    
    .tutorial-actions .btn {
        width: 100%;
    }
}

/* ================================
   WORDPRESS SPECIFIC STYLES
   ================================ */
.wp-block {
    max-width: 100%;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Admin Bar Fix */
body.admin-bar .site-header {
    top: 32px;
}

body.admin-bar .language-bar {
    margin-top: 102px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
    
    body.admin-bar .language-bar {
        margin-top: 116px;
    }
}

/* Elementor Compatibility */
.elementor-widget-container {
    color: var(--cm-light);
}

.elementor-widget-heading h1,
.elementor-widget-heading h2,
.elementor-widget-heading h3,
.elementor-widget-heading h4,
.elementor-widget-heading h5,
.elementor-widget-heading h6 {
    color: var(--cm-white);
}

/* Comments */
.comments-section {
    padding: 60px 0;
    background: var(--cm-dark);
}

.comments-title {
    color: var(--cm-white);
    margin-bottom: 30px;
}

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

.comment {
    background: var(--cm-darker);
    padding: 25px;
    border-radius: 16px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-author .fn {
    color: var(--cm-white);
    font-weight: 600;
}

.comment-metadata {
    color: rgba(241, 241, 241, 0.5);
    font-size: 0.85rem;
}

.comment-content {
    color: rgba(241, 241, 241, 0.8);
    line-height: 1.7;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--cm-green);
    font-weight: 500;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* Comment Form */
.comment-form label {
    display: block;
    color: var(--cm-light);
    margin-bottom: 8px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: var(--cm-darker);
    color: var(--cm-white);
    font-size: 1rem;
    margin-bottom: 20px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--cm-green);
}

.comment-form .submit {
    background: var(--gradient-green);
    color: var(--cm-white);
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.comment-form .submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
