* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F6FF 100%);
    color: #333333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(90deg, #6C4AB6 0%, #8B5FD1 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(108, 74, 182, 0.15);
    position: relative;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    cursor: pointer;
    z-index: 1001;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Auth Button Styles */
.auth-button {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.6rem 1.5rem !important;
    border-radius: 8px;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.auth-button:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px) !important;
}

.auth-button.logged-in {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
}

.auth-button.logged-in:hover {
    background: rgba(255, 107, 107, 0.3) !important;
    border-color: rgba(255, 107, 107, 0.6);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

/* Title Section */
.title-section {
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6C4AB6 0%, #B89BE0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666666;
    font-weight: 400;
    margin-bottom: 2rem;
}

/* Botão Criar Princípio */
.btn-criar-principio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6C4AB6 0%, #8B5FD1 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 6px 24px rgba(108, 74, 182, 0.3);
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn-criar-principio:hover {
    background: linear-gradient(135deg, #5A3E9B 0%, #7A52C4 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(108, 74, 182, 0.4);
}

/* Search Section */
.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(108, 74, 182, 0.1);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: #6C4AB6;
    box-shadow: 0 12px 40px rgba(108, 74, 182, 0.2);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #333333;
    background: transparent;
}

.search-input::placeholder {
    color: #666666;
}

.search-button {
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #6C4AB6 0%, #8B5FD1 100%);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.search-button:hover {
    background: linear-gradient(135deg, #5A3E9B 0%, #7A52C4 100%);
    transform: scale(1.02);
}

/* Results Section */
.results-section {
    margin-top: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 100%;
}

.principle-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #E0E0E0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.principle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6C4AB6 0%, #B89BE0 100%);
}

.principle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(108, 74, 182, 0.15);
    background: #E8DAFF;
    border-color: #B89BE0;
}

.principle-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #6C4AB6;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.principle-description {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.error-message {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFEBEE 100%);
    border-radius: 16px;
    border: 1px solid #FFB3B3;
    margin-top: 2rem;
}

.error-message h3 {
    color: #FF6B6B;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.error-message p {
    color: #666666;
    font-size: 1rem;
}

/* Footer */
.footer {
    background: #333333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer p {
    color: #B89BE0;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: #B89BE0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: linear-gradient(135deg, #6C4AB6 0%, #8B5FD1 100%);
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 5rem;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 2rem;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a {
        display: block;
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }

    .main-title {
        font-size: 2.5rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-button {
        width: 100%;
    }

    .btn-criar-principio {
        display: flex;
        width: 90%;
        justify-content: center;
    }

    .header-content {
        padding: 0 1rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .btn-criar-principio {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
}