:root {
    /* Main colors for the theme */
    --primary-color: #1a2c42;    /* Darker navy blue */
    --secondary-color: #2e3e4e;  /* Darker blue-gray */
    --accent-color: #506d7e;     /* Muted blue-gray */
    
    /* Complementary colors */
    --light-color: #e6eaef;      /* Slightly muted light gray */
    --dark-color: #151e2b;       /* Deep blue-black */
    
    /* Design elements */
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.15);  /* Subtle shadow */
    --radius: 2px;      
    --transition: all 0.2s ease; /* Faster, more professional transition */
    
    /* Additional colors */
    --military-green: #3a4218;   /* Darker green */
    --navy-blue: #002850;        /* Deeper navy blue */
    --steel-gray: #5a636a;       /* Darker steel gray */
    --sand-beige: #bfa980;       /* Muted sand beige */
    --alert-red: #7a0000;        /* Subdued red for alerts */
}

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

body {
    font-family: 'Arial', 'Helvetica', sans-serif; /* More formal font */
    line-height: 1.5;
    color: var(--dark-color);
    background-color: #e2e5e9;  /* Slightly muted background */
    padding: 0;
}

.container {
    max-width: 1100px;
    margin: 1.5rem auto; /* Reduced margin for more compact look */
    padding: 0 20px;
}

header {
    background: linear-gradient(to right, var(--primary-color), var(--navy-blue)); /* More horizontal, formal gradient */
    color: white;
    padding: 1.75rem 0; /* Slightly reduced padding */
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 3px solid var(--military-green); /* Bottom border to emphasize structure */
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px; /* Letter spacing for more formality */
    text-transform: uppercase; /* Uppercase for main titles */
    font-size: 1.75rem; /* Slightly reduced size */
}

.welcome-card {
    background-color: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--military-green);
}

.files-container {
    background-color: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid #d8dde3; /* Subtle border to emphasize structure */
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #c8d0d9; /* More defined border */
}

.files-title {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase; /* Consistency with header style */
    letter-spacing: 0.5px;
}

.files-count {
    background-color: var(--light-color);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 2px; /* Consistency with --radius */
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #d0d6df; /* Subtle border */
}

.files-list {
    margin-bottom: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem; /* Reduced margin for more compact look */
    background-color: var(--light-color);
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    border: 1px solid #d8dde3; /* Subtle border for better definition */
}

.file-item:hover {
    transform: translateY(-2px); /* More subtle movement */
    box-shadow: var(--shadow);
    background-color: #d8dfe8; /* More subtle hover color */
    border-color: #c0c8d2;
}

.file-icon {
    font-size: 1.4rem;
    margin-right: 1rem;
    color: var(--accent-color);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600; /* Bolder for better readability */
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.file-meta {
    display: flex;
    font-size: 0.8rem; /* Reduced size for metadata */
    color: var(--steel-gray);
}

.meta-item {
    margin-right: 1.25rem;
}

.download-btn {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    text-transform: uppercase; /* Consistency with overall style */
    font-size: 0.85rem; /* Reduced size for buttons */
    letter-spacing: 0.5px;
}

.download-btn:hover {
    background-color: var(--navy-blue);
}

.no-files {
    text-align: center;
    padding: 2rem;
    color: var(--steel-gray);
    font-style: italic;
    background-color: var(--light-color);
    border-radius: var(--radius);
    border: 1px solid #d8dde3;
}

footer {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    color: var(--steel-gray);
    font-size: 0.85rem;
    border-top: 1px solid #d8dde3;
}

.update-time {
    font-size: 0.75rem;
    text-align: right;
    color: var(--steel-gray);
    margin-top: 1rem;
    font-weight: 500;
}

/* Styles for 403 error page */
.error-icon {
    font-size: 4rem;
    color: #7a0000; /* Using alert red */
    margin-bottom: 1rem;
}

.error-container {
    text-align: center;
    padding: 2rem;
}

.error-code {
    display: inline-block;
    background-color: rgba(122, 0, 0, 0.1);
    color: #7a0000;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Styles for main index restricted access page */
.locked-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.access-container {
    text-align: center;
    padding: 2rem;
}

.action-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn:hover {
    background-color: var(--navy-blue);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-icon {
        margin-bottom: 0.5rem;
    }
    
    .download-btn {
        margin-top: 1rem;
        width: 100%;
        text-align: center;
    }
}