/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* Estilos aplicados no html para evitar flash */
html {
    background: #f5f5f7;
    color: #1d1d1f;
}

html.dark-mode {
    background: #1a1a1a;
    color: #f5f5f7;
}

body {
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
    transition: background 0.5s ease, color 0.5s ease;
}

html.dark-mode body,
body.dark-mode {
    background: #1a1a1a;
    color: #f5f5f7;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    z-index: 1000;
}

html.dark-mode header,
body.dark-mode header {
    background: #2a2a2a;
    box-shadow: 0 1px 3px rgba(255,255,255,0.05);
}

header .logo {
    font-size: 1.5em;
    font-weight: bold;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.desktop-nav ul li {
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 5px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.desktop-nav ul li .menu-icon {
    width: 20px;
    height: 20px;
    stroke: #1d1d1f;
    transition: stroke 0.5s ease;
}

html.dark-mode .desktop-nav ul li .menu-icon,
body.dark-mode .desktop-nav ul li .menu-icon {
    stroke: #f5f5f7;
}

.desktop-nav ul li:hover,
.desktop-nav ul li.active {
    background: #e8e8ed;
}

html.dark-mode .desktop-nav ul li:hover,
html.dark-mode .desktop-nav ul li.active,
body.dark-mode .desktop-nav ul li:hover,
body.dark-mode .desktop-nav ul li.active {
    background: #3a3a3a;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
    position: relative;
    width: 44px;
    height: 44px;
}

.mobile-menu-btn:hover {
    background: #e8e8ed;
}

html.dark-mode .mobile-menu-btn:hover,
body.dark-mode .mobile-menu-btn:hover {
    background: #3a3a3a;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: #1d1d1f;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

html.dark-mode .mobile-menu-btn svg,
body.dark-mode .mobile-menu-btn svg {
    stroke: #f5f5f7;
}

.mobile-menu-btn .hamburger-icon {
    opacity: 1;
}

.mobile-menu-btn .close-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

.mobile-menu-btn.active .hamburger-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.mobile-menu-btn.active .close-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

html.dark-mode .mobile-nav,
body.dark-mode .mobile-nav {
    background: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.mobile-nav.active {
    max-height: 300px;
    opacity: 1;
}

.mobile-nav ul {
    list-style: none;
    padding: 15px 0;
}

.mobile-nav ul li {
    cursor: pointer;
    padding: 15px 30px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.mobile-nav ul li .menu-icon {
    width: 20px;
    height: 20px;
    stroke: #1d1d1f;
    transition: stroke 0.5s ease;
}

html.dark-mode .mobile-nav ul li .menu-icon,
body.dark-mode .mobile-nav ul li .menu-icon {
    stroke: #f5f5f7;
}

.mobile-nav ul li:hover,
.mobile-nav ul li.active {
    background: #e8e8ed;
    border-left-color: #667eea;
}

html.dark-mode .mobile-nav ul li:hover,
html.dark-mode .mobile-nav ul li.active,
body.dark-mode .mobile-nav ul li:hover,
body.dark-mode .mobile-nav ul li.active {
    background: #3a3a3a;
}

main {
    padding: 50px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
    width: 100%;
    opacity: 0;
}

.page.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.home-container {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.main-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 30px;
    animation: slideDown 0.8s ease;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    animation: fadeInUp 1s ease 0.3s both;
}

.skill {
    background: #ffffff;
    color: #1d1d1f;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: popIn 0.6s ease backwards;
}

html.dark-mode .skill,
body.dark-mode .skill {
    background: #2a2a2a;
    color: #f5f5f7;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.skill:nth-child(1) { animation-delay: 0.4s; }
.skill:nth-child(2) { animation-delay: 0.5s; }
.skill:nth-child(3) { animation-delay: 0.6s; }
.skill:nth-child(4) { animation-delay: 0.7s; }
.skill:nth-child(5) { animation-delay: 0.8s; }
.skill:nth-child(6) { animation-delay: 0.9s; }

.skill:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

html.dark-mode .skill:hover,
body.dark-mode .skill:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

/* Equipe e ZionNox Pages */
#equipe.page.active,
#zionnox.page.active {
    display: block;
}

.zionnox-container {
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease;
}

.zionnox-header {
    text-align: center;
    margin-bottom: 50px;
}

.bot-icon {
    width: 60px;
    height: 60px;
    stroke: #1d1d1f;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

html.dark-mode .bot-icon,
body.dark-mode .bot-icon {
    stroke: #f5f5f7;
}

.zionnox-title {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: slideDown 0.8s ease;
}

.zionnox-description {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 30px;
    animation: fadeIn 1s ease 0.3s both;
}

.bot-avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    animation: popIn 0.8s ease 0.5s both;
    transition: transform 0.3s ease;
}

.bot-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

html.dark-mode .bot-avatar,
body.dark-mode .bot-avatar {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.bot-status-card {
    background: #ffffff;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin: 0 auto 30px;
    max-width: 400px;
    animation: fadeInUp 1s ease 0.6s both;
}

html.dark-mode .bot-status-card,
body.dark-mode .bot-status-card {
    background: #2a2a2a;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

html.dark-mode .status-item,
body.dark-mode .status-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 600;
    opacity: 0.7;
}

.status-value {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #95a5a6;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.status-dot.offline {
    background: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.status-dot.configuring {
    background: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.status-value.online {
    color: #2ecc71;
}

.status-value.offline {
    color: #e74c3c;
}

.status-value.configuring {
    color: #f39c12;
    font-size: 0.9rem;
}

.add-bot-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.add-bot-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.add-bot-btn svg {
    width: 20px;
    height: 20px;
}

.commands-section {
    margin-top: 40px;
}

.commands-title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    animation: slideDown 1s ease 0.4s both;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.command-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    animation: popIn 0.6s ease backwards;
}

html.dark-mode .command-card,
body.dark-mode .command-card {
    background: #2a2a2a;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.command-card:nth-child(1) { animation-delay: 0.5s; }
.command-card:nth-child(2) { animation-delay: 0.6s; }
.command-card:nth-child(3) { animation-delay: 0.7s; }
.command-card:nth-child(4) { animation-delay: 0.8s; }
.command-card:nth-child(5) { animation-delay: 0.9s; }

.command-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

html.dark-mode .command-card:hover,
body.dark-mode .command-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.command-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

html.dark-mode .command-name,
body.dark-mode .command-name {
    color: #8b9ff5;
}

.command-desc {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.5;
}

.team-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

html.dark-mode .team-card,
body.dark-mode .team-card {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
    position: relative;
    width: 44px;
    height: 44px;
}

#theme-toggle:hover {
    background: #e8e8ed;
}

html.dark-mode #theme-toggle:hover,
body.dark-mode #theme-toggle:hover {
    background: #3a3a3a;
}

#theme-toggle svg {
    width: 24px;
    height: 24px;
    position: absolute;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.sun-icon {
    stroke: #1d1d1f;
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

html.dark-mode .sun-icon,
body.dark-mode .sun-icon {
    transform: rotate(180deg) scale(0);
    opacity: 0;
}

.moon-icon {
    stroke: #1d1d1f;
    transform: rotate(-180deg) scale(0);
    opacity: 0;
}

html.dark-mode .moon-icon,
body.dark-mode .moon-icon {
    stroke: #f5f5f7;
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

/* Block Overlay */
#block-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: blockFadeIn 0.3s ease;
}

#block-overlay.fade-out {
    animation: blockFadeOut 0.5s ease forwards;
}

.block-content {
    text-align: center;
    animation: blockShake 0.5s ease;
}

.block-icon {
    stroke: #ff4757;
    margin-bottom: 20px;
    animation: blockRotate 0.6s ease;
}

.block-title {
    color: #ff4757;
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: blockPulse 1s ease infinite;
}

.block-message {
    color: #f5f5f7;
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-50px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% { 
        opacity: 0; 
        transform: scale(0.5);
    }
    70% { 
        transform: scale(1.1);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% { 
        transform: translateY(0);
    }
    50% { 
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.03);
    }
}

@keyframes blockFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes blockFadeOut {
    to { opacity: 0; }
}

@keyframes blockShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

@keyframes blockRotate {
    0% {
        transform: rotate(0deg) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

@keyframes blockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-nav {
        display: block;
    }
    
    header {
        padding: 15px 20px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .skill {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .zionnox-title {
        font-size: 2rem;
    }
    
    .zionnox-description {
        font-size: 1rem;
    }
    
    .commands-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 30px 20px;
    }
}