/* Battleship Legal Documents Styles */

/* CSS Variables for maritime theme matching Battleship app */
:root {
    --primary-color: #0ea5e9;
    --primary-hover: #0284c7;
    --secondary-color: #06b6d4;
    --secondary-hover: #0891b2;
    --accent-color: #3b82f6;
    --background-color: #f0f9ff;
    --surface-color: #ffffff;
    --text-primary: #0c4a6e;
    --text-secondary: #075985;
    --border-color: #bae6fd;
    --shadow-sm: 0 1px 2px 0 rgb(14 165 233 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(14 165 233 / 0.15), 0 2px 4px -2px rgb(14 165 233 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(14 165 233 / 0.2), 0 4px 6px -4px rgb(14 165 233 / 0.15);
    --glow-blue: 0 0 20px rgba(14, 165, 233, 0.3);
    --glow-cyan: 0 0 15px rgba(6, 182, 212, 0.4);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.2) 0%, 
        rgba(6, 182, 212, 0.1) 50%, 
        rgba(255, 255, 255, 0.9) 100%);
    min-height: 100vh;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 3rem;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main content */
main {
    flex: 1;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.welcome-section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.welcome-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Document cards */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.document-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.document-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.document-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.document-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Button styles */
.button-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* App info section */
.app-info {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.app-info h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.info-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.info-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Footer */
footer {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: auto;
}

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

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.footer-links a:hover {
    background: var(--background-color);
}

.separator {
    color: var(--text-secondary);
    font-weight: 300;
}

/* Document pages specific styles */
.document-content {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.document-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.document-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.app-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: var(--glow-blue);
    animation: float 3s ease-in-out infinite;
}

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

.document-content h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2.75rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(14, 165, 233, 0.2);
}

.last-updated {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.document-content h2 {
    color: var(--primary-color);
    margin: 2.5rem 0 1.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    position: relative;
    text-shadow: 1px 1px 2px rgba(14, 165, 233, 0.1);
}

.document-content h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.document-content h3 {
    color: var(--accent-color);
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-content h3::before {
    content: '⚓';
    font-size: 1.25rem;
    opacity: 0.6;
}

.document-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.document-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.document-content li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 0.5rem;
}

.document-content li::before {
    content: '⚫';
    color: var(--primary-color);
    position: absolute;
    left: -1.5rem;
    font-size: 0.6rem;
    top: 0.6rem;
}

.document-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.document-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.document-content a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-color);
    text-shadow: var(--glow-blue);
}

/* Floating particles effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: float-particles 20s ease-in-out infinite;
}

@keyframes float-particles {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    background: var(--background-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.back-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    header {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .document-card {
        padding: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .separator {
        display: none;
    }
    
    .document-content {
        padding: 2rem 1rem;
    }
    
    .document-content h1 {
        font-size: 2rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    header, footer, .welcome-section, .app-info {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn, .back-link {
        display: none;
    }
}

/* Dark mode support - Maritime dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0c1929;
        --surface-color: #1e2a3a;
        --text-primary: #f0f9ff;
        --text-secondary: #bae6fd;
        --border-color: #1e40af;
        --primary-color: #38bdf8;
        --secondary-color: #22d3ee;
        --accent-color: #60a5fa;
        --glow-blue: 0 0 20px rgba(56, 189, 248, 0.4);
        --glow-cyan: 0 0 15px rgba(34, 211, 238, 0.5);
    }
    
    body {
        background: linear-gradient(135deg, 
            rgba(30, 42, 58, 0.8) 0%, 
            rgba(12, 25, 41, 0.9) 50%, 
            rgba(14, 37, 44, 0.9) 100%);
    }
    
    .document-content {
        background: rgba(30, 42, 58, 0.95);
        border-color: var(--border-color);
        backdrop-filter: blur(10px);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}