/**
 * Secure Content Delivery App - Styles
 */

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

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

.nav-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #333;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #0066cc;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #0052a3;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
}

.btn-outline {
    background: transparent;
    border: 2px solid #0066cc;
    color: #0066cc;
}

.btn-outline:hover:not(:disabled) {
    background: #0066cc;
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.form-control::placeholder {
    color: #999;
}

/* Flash Messages */
.flash-messages {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.flash {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.flash.error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.flash.info {
    background: #e7f3ff;
    color: #0066cc;
    border: 1px solid #b3d9ff;
}

.flash.success {
    background: #e7ffe7;
    color: #006600;
    border: 1px solid #b3ffb3;
}

.flash.warning {
    background: #fff8e7;
    color: #996600;
    border: 1px solid #ffe0b3;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

/* Security Styles */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .card {
        padding: 20px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}

/* Print Protection */
@media print {
    body {
        visibility: hidden;
    }

    body::after {
        visibility: visible;
        content: 'Printing is disabled for this content.';
        display: block;
        font-size: 24px;
        text-align: center;
        padding: 100px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
}
