/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00f2a0;
    --primary-hover-color: #00e094;
    --dark-color: #121212;
    --light-color: #ffffff;
    --off-white-color: #f0f0f0;
    --grey-color: #1e1e1e;
    --border-color: #333333;
    --border-radius: 16px;
    --box-shadow: 0 8px 32px rgba(0, 242, 160, 0.15);
    --transition: all 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-color);
    color: var(--light-color);
    line-height: 1.7;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, rgba(0, 242, 160, 0.08), transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(0, 242, 160, 0.08), transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Nav & Header styles */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0; 
    position: sticky; /* fixa o nav no topo da página */
    top: 0;
    background: rgb(17 32 27 / 0%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    margin-bottom: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--light-color);
    gap: 10px;
}

.logo-img {
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    opacity: 0.9;
    transition: var(--transition);
}

.nav-links a:not(.nav-btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a:hover:not(.nav-btn)::after {
    width: 100%;
}

.nav-btn {
    padding: 8px 20px !important;
    border-radius: var(--border-radius) !important;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

header.home-header {
    text-align: left;
    margin-bottom: 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 20px;
    color: var(--light-color);
    font-family: 'Bangers', cursive;
    letter-spacing: 2px;
    line-height: 1.1;
    font-weight: 400;
}

h1 > span {
    color: var(--primary-color);
}

.tagline {
    font-size: 1.2rem;
    color: var(--light-color);
    opacity: 0.8;
}

/* Main content styles */
main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

section {
    background-color: transparent;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: none;
    border: none;
}

h2 {
    margin-bottom: 40px;
    color: var(--light-color);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
    display: inline-block;
    font-family: 'Bangers', cursive;
    letter-spacing: 1px;
}

/* Options panel styles */
.options-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--light-color);
}

select {
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--grey-color);
    color: var(--light-color);
    font-size: 1rem;
    transition: var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 242, 160, 0.25);
}

.option-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--grey-color);
    color: var(--light-color);
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    transition: var(--transition);
}

.option-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 242, 160, 0.25);
    background-color: #2a2a2a;
}

/* Button styles */
button, .primary-btn, .secondary-btn {
    cursor: pointer;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-btn {
    background: linear-gradient(45deg, var(--primary-color), #00d49f);
    color: var(--dark-color);
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 242, 160, 0.2);
}

.primary-btn:hover {
    background: linear-gradient(45deg, var(--primary-hover-color), #00c785);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 242, 160, 0.3);
}

.secondary-btn {
    background-color: var(--grey-color);
    color: var(--off-white-color);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background-color: var(--border-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Loading section styles */
.loading-section {
    text-align: center;
    padding: 40px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--grey-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-message {
    margin-top: 10px;
    font-style: italic;
    color: #aaa;
}

/* Page navigation styles */
.page-navigation {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.page-navigation select {
    padding: 8px 16px;
    font-size: 1rem;
    border-radius: var(--border-radius);
    background-color: var(--grey-color);
    border: 1px solid var(--border-color);
}

/* Comic display styles */
.comic-page {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.panel {
    background-color: #000;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    min-height: 200px;
    aspect-ratio: 1 / 1;
    transition: var(--transition);
}

.panel:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.comic-container.format-1-1 .panel {
    aspect-ratio: 1/1;
}

.comic-container.format-9-16 .panel {
    aspect-ratio: 9/16;
}

.panel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    z-index: 1;
}

.panel img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speech-bubble {
    position: absolute;
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 2px solid var(--dark-color);
    border-radius: 15px;
    padding: 10px 15px;
    max-width: 80%;
    font-family: 'Bangers', cursive;
    font-size: 16px;
    letter-spacing: 0.5px;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.4);
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.speech-bubble:after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: var(--light-color);
    border-right: 2px solid var(--dark-color);
    border-bottom: 2px solid var(--dark-color);
    transform: rotate(45deg);
    /* Default position - will be overridden by JS */
    bottom: -10px;
    left: 20%;
}

.bubble-text {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 5px;
    box-sizing: border-box;
}

.comic-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Edit positions mode styles */
.editing-mode .speech-bubble.editable {
    cursor: move;
    border: 2px dashed var(--primary-color);
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 100;
    min-width: 60px;
    min-height: 40px;
}

.resize-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    bottom: -10px;
    right: -10px;
    background-color: var(--primary-color);
    border: 2px solid var(--light-color);
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 101;
}

.rotate-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    top: -10px;
    right: -10px;
    background-color: var(--primary-color);
    border: 2px solid var(--light-color);
    border-radius: 50%;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><path fill='black' d='M12,5V1L7,6L12,11V7A6,6 0 0,1 18,13A6,6 0 0,1 12,19A6,6 0 0,1 6,13H4A8,8 0 0,0 12,5Z'/></svg>") 8 8, auto;
    z-index: 101;
}

.pointer-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #a29bfe; /* A contrasting purple */
    border: 2px solid var(--light-color);
    border-radius: 50%;
    cursor: move;
    z-index: 101;
}

.editing-mode .speech-bubble:after {
    display: none;
}

.edit-instructions {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
    border: 1px solid var(--primary-color);
}

/* Grid layouts for different panel configurations */
.panels-1 {
    grid-template-columns: 1fr;
}

.panels-2 {
    grid-template-columns: repeat(2, 1fr);
}

.panels-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.panels-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.panels-6 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-template-rows: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .comic-container.format-9-16.panels-1 {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .comic-container.format-9-16.panels-2 {
        grid-template-columns: 1fr;
    }
    
    .comic-container.format-9-16.panels-4 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Edit dialogues section */
.dialogue-editor {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    position: relative;
    background: var(--grey-color);
}

.delete-bubble-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    background-color: #ff4757;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.delete-bubble-btn:hover {
    background-color: #e04050;
}

.dialogue-editor label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.dialogue-editor textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    background-color: var(--dark-color);
    color: var(--light-color);
    transition: var(--transition);
}

.dialogue-editor textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #2a2a2a;
}

.edit-controls {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 15px;
}

/* Font controls in dialogue editor */
.font-controls {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.font-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.font-control select, .font-control input {
    padding: 8px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--grey-color);
    color: var(--light-color);
    font-size: 0.9rem;
}

/* Sample text for font preview */
.font-sample {
    margin-top: 5px;
    padding: 10px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: var(--dark-color);
}

/* Utility classes */
.hidden {
    display: none;
}

/* Modal styles for panel selection */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--grey-color);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.panel-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.panel-option {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: var(--dark-color);
}

.panel-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 242, 160, 0.2);
}

.panel-option img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
}

/* Add styling for blank comic panels */
.panel.blank-panel {
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.panel.blank-panel::before {
    content: '+';
    font-size: 48px;
    color: var(--grey-color);
}

/* Language selector styles */
.language-selector {
    z-index: 100;
}

.language-selector select {
    padding: 8px 30px 8px 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--grey-color);
    color: var(--light-color);
    font-size: 0.9rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f2a0'%3E%3Cpath d='M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 20px auto;
    cursor: pointer;
    transition: var(--transition);
}

.language-selector select:focus {
     box-shadow: 0 0 0 3px rgba(0, 242, 160, 0.25);
     border-color: var(--primary-color);
}

/* Footer styles */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #888;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2.5rem;
        text-align: center;
    }

    h2 {
        font-size: 2rem;
        text-align: center;
        width: 100%;
    }
    
    .panels-3, .panels-4, .panels-6 {
        grid-template-columns: 1fr;
    }
    
    .comic-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    button {
        width: 100%;
        margin-bottom: 0;
    }

    .font-controls {
        flex-direction: column;
        gap: 20px;
    }
}

/* Responsive adjustments for language selector */
@media (max-width: 768px) {
    .main-nav {
        padding: 15px 0;
    }
    .nav-links {
        display: none;
    }
}

/* Background options modal styles */
.background-options {
    max-width: 600px;
}

.background-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--light-color);
    opacity: 0.7;
    border-bottom: 3px solid transparent;
    flex-grow: 1;
    text-align: center;
}

.tab-btn.active {
    opacity: 1;
    border-bottom: 3px solid var(--primary-color);
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-input-label {
    display: block;
    padding: 12px 20px;
    background-color: var(--grey-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
}

.file-input-label:hover {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.preview-container {
    margin: 15px 0;
    text-align: center;
    max-height: 300px;
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--dark-color);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.ai-tab textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    resize: vertical;
    margin-bottom: 15px;
    background-color: var(--dark-color);
    color: var(--light-color);
}

.ai-tab textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.resize-options {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.resize-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.resize-btn {
    padding: 8px 15px;
    background-color: var(--dark-color);
    color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.resize-btn:hover, .resize-btn.active {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-color: var(--primary-color);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Mobile adjustments for background options */
@media (max-width: 768px) {
    .resize-buttons {
        flex-direction: column;
    }
    
    .background-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: center;
        padding: 15px;
    }
}

/* Modal styles for blank project creation */
.modal-content .option-group {
    margin-bottom: 20px;
}

.modal-content .option-group label {
    display: block;
    margin-bottom: 8px;
}

.modal-content .option-group select {
    width: 100%;
}

#blank-project-btn {
    margin-top: 10px;
}

/* Character creation styles */
.character-options {
    max-width: 600px;
}

.character-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.character-preview {
    max-height: 300px;
    display: flex;
    justify-content: center;
    background-color: var(--dark-color);
    background-image: linear-gradient(45deg, var(--grey-color) 25%, transparent 25%, transparent 75%, var(--grey-color) 75%, var(--grey-color)),
                      linear-gradient(45deg, var(--grey-color) 25%, transparent 25%, transparent 75%, var(--grey-color) 75%, var(--grey-color));
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin: 15px 0;
    padding: 10px;
}

.character-preview img {
    max-height: 250px;
    object-fit: contain;
}

.draggable-character {
    position: absolute;
    z-index: 4;
    cursor: move;
    max-width: 100%;
    max-height: 100%;
}

.character-resize-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    bottom: -10px;
    right: -10px;
    background-color: var(--primary-color);
    border: 2px solid var(--light-color);
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 101;
}

.character-rotate-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    top: -10px;
    right: -10px;
    background-color: var(--primary-color);
    border: 2px solid var(--light-color);
    border-radius: 50%;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'><path fill='black' d='M12,5V1L7,6L12,11V7A6,6 0 0,1 18,13A6,6 0 0,1 12,19A6,6 0 0,1 6,13H4A8,8 0 0,0 12,5Z'/></svg>") 8 8, auto;
    z-index: 101;
}

.character-delete-button {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 24px;
    height: 24px;
    background-color: #ff4757;
    border-radius: 50%;
    cursor: pointer;
    z-index: 102;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--light-color);
}

.character-delete-button::before,
.character-delete-button::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background-color: var(--light-color);
}

.character-delete-button::before {
    transform: rotate(45deg);
}

.character-delete-button::after {
    transform: rotate(-45deg);
}

.character-delete-button:hover {
    background-color: #e04050;
    transform: scale(1.1);
}

/* Home Page Styles */
.home-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.home-header h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    font-family: 'Bangers', cursive;
    letter-spacing: 2px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 50px 0;
    background: var(--grey-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
}

.hero-text {
    flex: 1;
  padding: 20px;
}

.hero-text h1 {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--light-color);
    font-family: 'Bangers', cursive;
}

.hero-text p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 40px;
    opacity: 0.8;
    max-width: 500px;
}

.hero-btn {
    font-size: 1.2rem;
    padding: 18px 40px;
    text-decoration: none;
    display: inline-block;
}

.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--dark-color));
    filter: blur(80px);
    opacity: 0.3;
    z-index: 0;
    border-radius: 50%;
}

.hero-image {
    position: relative;
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.features {
    text-align: center;
    padding: 80px 20px;
    background-color: transparent;
    border-radius: var(--border-radius);
    border: none;
    box-shadow: none;
}

.features h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 60px;
    display: inline-block;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    padding: 40px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: var(--grey-color);
    border: 1px solid var(--border-color);
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 8px rgba(0, 242, 160, 0.5));
}

.feature-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--light-color);
    font-weight: 600;
}

.feature-card p {
    font-size: 1rem;
    opacity: 0.8;
}

.home-footer {
    text-align: center;
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }
    
    .hero-image-container {
        order: 1;
        margin-bottom: 40px;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
}