/* Main CSS File - Imports all other CSS files */

/* Import order is important for CSS cascade */
@import url('reset.css');
@import url('variables.css');
@import url('base.css');
@import url('components.css');
@import url('animations.css');
@import url('responsive.css');

/* Additional custom styles that override or extend the above */

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Firefox scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-secondary);
}

/* Selection styles */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
}

/* Focus styles for better accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
a, button, input, textarea, select {
    transition: all var(--transition-fast);
}

/* Improved text rendering */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Better image handling */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Improved form elements */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Better button states */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Improved link states */
a:visited {
    color: var(--primary-light);
}

/* Better table styles if needed */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    text-align: left;
    padding: var(--space-3);
    border-bottom: 1px solid var(--glass-border);
}

th {
    font-weight: var(--font-weight-semibold);
    background: var(--glass-bg);
}

/* Code block styles */
code {
    font-family: var(--font-mono);
    background: var(--glass-bg);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

pre {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    overflow-x: auto;
    font-family: var(--font-mono);
}

pre code {
    background: none;
    padding: 0;
}

/* Blockquote styles */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: var(--space-4);
    margin: var(--space-6) 0;
    font-style: italic;
    color: var(--gray-300);
}

/* Horizontal rule styles */
hr {
    border: none;
    height: 1px;
    background: var(--glass-border);
    margin: var(--space-8) 0;
}

/* List styles for content areas */
.content ul,
.content ol {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
}

.content ul {
    list-style-type: disc;
}

.content ol {
    list-style-type: decimal;
}

.content li {
    margin-bottom: var(--space-2);
    color: var(--gray-300);
}

/* Definition list styles */
dl {
    margin: var(--space-4) 0;
}

dt {
    font-weight: var(--font-weight-semibold);
    color: var(--white);
    margin-bottom: var(--space-1);
}

dd {
    margin-left: var(--space-4);
    color: var(--gray-300);
    margin-bottom: var(--space-3);
}

/* Fieldset and legend styles */
fieldset {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin: var(--space-4) 0;
}

legend {
    padding: 0 var(--space-2);
    font-weight: var(--font-weight-semibold);
    color: var(--white);
}

/* Progress bar styles */
progress {
    width: 100%;
    height: 8px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
}

progress::-webkit-progress-bar {
    background: var(--glass-bg);
    border-radius: var(--radius-full);
}

progress::-webkit-progress-value {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

progress::-moz-progress-bar {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

/* Meter styles */
meter {
    width: 100%;
    height: 8px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
}

meter::-webkit-meter-bar {
    background: var(--glass-bg);
    border-radius: var(--radius-full);
}

meter::-webkit-meter-optimum-value {
    background: var(--success-color);
    border-radius: var(--radius-full);
}

meter::-webkit-meter-suboptimum-value {
    background: var(--warning-color);
    border-radius: var(--radius-full);
}

meter::-webkit-meter-even-less-good-value {
    background: var(--error-color);
    border-radius: var(--radius-full);
}

/* Details and summary styles */
details {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin: var(--space-4) 0;
}

summary {
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    color: var(--white);
    margin-bottom: var(--space-2);
}

details[open] summary {
    margin-bottom: var(--space-4);
}

/* Mark/highlight styles */
mark {
    background: var(--warning-color);
    color: var(--white);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* Small text styles */
small {
    font-size: var(--font-size-sm);
    color: var(--gray-400);
}

/* Sub and sup styles */
sub, sup {
    font-size: var(--font-size-xs);
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

/* KBD (keyboard) styles */
kbd {
    font-family: var(--font-mono);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--white);
}

/* Sample text styles */
samp {
    font-family: var(--font-mono);
    background: var(--glass-bg);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--white);
}

/* Variable text styles */
var {
    font-style: italic;
    color: var(--primary-color);
}

/* Time element styles */
time {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
}

/* Address styles */
address {
    font-style: normal;
    color: var(--gray-300);
    line-height: var(--line-height-relaxed);
}

/* Cite styles */
cite {
    font-style: italic;
    color: var(--gray-400);
}

/* Abbreviation styles */
abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* Definition styles */
dfn {
    font-style: italic;
    color: var(--primary-color);
}

/* Insert and delete styles */
ins {
    background: var(--success-color);
    color: var(--white);
    text-decoration: none;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

del {
    background: var(--error-color);
    color: var(--white);
    text-decoration: line-through;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

/* Utility classes for common patterns */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-break {
    word-break: break-word;
    overflow-wrap: break-word;
}

.text-nowrap {
    white-space: nowrap;
}

.text-pre {
    white-space: pre;
}

.text-pre-line {
    white-space: pre-line;
}

.text-pre-wrap {
    white-space: pre-wrap;
}

/* Flexbox utilities */
.d-flex {
    display: flex;
}

.d-inline-flex {
    display: inline-flex;
}

.flex-row {
    flex-direction: row;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.align-start {
    align-items: flex-start;
}

.align-end {
    align-items: flex-end;
}

.align-center {
    align-items: center;
}

.align-baseline {
    align-items: baseline;
}

.align-stretch {
    align-items: stretch;
}

/* Grid utilities */
.d-grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gap-1 {
    gap: var(--space-1);
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

/* Spacing utilities */
.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* Width utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-fit { width: fit-content; }

/* Height utilities */
.h-full { height: 100%; }
.h-auto { height: auto; }
.h-fit { height: fit-content; }

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Overflow utilities */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

/* Border utilities */
.border { border: 1px solid var(--glass-border); }
.border-0 { border: 0; }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* Opacity utilities */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Visibility utilities */
.visible { visibility: visible; }
.invisible { visibility: hidden; }
.hidden { display: none; }

/* Z-index utilities */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
