/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #3498db;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #3498db;
}

.logo img {
    height: 50px;
    margin-right: 10px;
    border-radius: 8px;
}

.nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav a:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.nav a.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.auth-buttons.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.auth-btn.login {
    background: transparent;
    color: #2c3e50;
    border-color: #3498db;
}

.auth-btn.login:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.auth-btn.register {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.auth-btn.register:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 2rem auto;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1200px;
}

.content-wrapper {
    padding: 3rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    color: #34495e;
    margin: 2rem 0 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid #3498db;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1), transparent);
    padding: 1rem;
    border-radius: 0 10px 10px 0;
}

h3 {
    font-size: 1.4rem;
    color: #34495e;
    margin: 1.5rem 0 0.8rem 0;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

/* Lists */
ul, ol {
    margin: 1rem 0 1.5rem 2rem;
}

li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: 600;
}

tr:hover {
    background: rgba(52, 152, 219, 0.05);
}

/* Definition Lists */
dl {
    margin: 2rem 0;
}

dt {
    font-weight: bold;
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

dd {
    margin-left: 1rem;
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.6;
}

/* Banner Styles */
.banner {
    width: 100%;
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.banner:hover {
    transform: translateY(-5px);
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sections */
section {
    margin-bottom: 1rem;
    padding: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 3rem 0 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section span {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
}

.footer-section ul {
    list-style: none;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: white !important;
}

.footer-bottom p {
    color: white !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Hide navigation on homepage */
    .homepage .nav {
        display: none;
    }
    
    /* Hide mobile menu toggle on homepage */
    .homepage .mobile-menu-toggle {
        display: none;
    }
    
    /* Auth buttons on mobile */
    .homepage .auth-buttons {
        gap: 0.5rem;
    }
    
    .homepage .auth-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Regular pages navigation */
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav.active {
        display: flex;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .main-content {
        margin: 1rem;
        border-radius: 15px;
    }
    
    section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.8rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    section {
        padding: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

/* Footer Updates */
.footer-section p {
    color: white;
}

.footer-section ul li {
    color: white;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .scroll-to-top {
        display: none;
    }
    
    .main-content {
        box-shadow: none;
        background: white;
    }
    
    body {
        background: white;
    }
}
