@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700&display=swap');

:root {
    --primary: #3b82f6;
    --secondary: #ec4899;
    --accent: #10b981;
}

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

.hidden {
    display: none;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    background-attachment: fixed;
    color: #3d5a80;
    min-height: 100vh;
}

body.dark-mode {
  background: linear-gradient(135deg, #0f172a 0%, #111827 50%, #1f2937 100%);
  color: #e2e8f0;
}

body.dark-mode header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .logo {
    color: #7dd3fc;
    text-shadow: 0 0 12px rgba(125, 211, 252, 0.45);
}

body.dark-mode .back-btn {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #60a5fa !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
}

body.dark-mode .back-btn:hover {
  background: rgba(96, 165, 250, 0.2) !important;
  border-color: #60a5fa !important;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3) !important;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 60px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #3b82f6;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 767px) {
    .logo-img {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        width: 28px;
        height: 28px;
    }
}

.back-btn {
    background: #ffffff;
    color: #3b82f6;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-btn:hover {
    background: #f8fafc !important;
    border-color: #3b82f6 !important;
    transform: scale(1.05);
}

.page-header {
    padding: 60px 20px;
    text-align: center;
}

.page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 48px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #3d5a80;
}

.page-header p {
    font-size: 18px;
    color: #5b7fa8;
}

.page-header .reg-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 18px;
  font-weight: 600;
  color: #3b82f6;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

body.dark-mode .page-header h1 {
  color: #f1f5f9;
}

body.dark-mode .page-header p {
  color: #cbd5e1;
}

body.dark-mode .page-header .reg-info {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    padding: 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.filter-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 24px;
    border-radius: 16px;
    height: fit-content;
    position: sticky;
    top: 80px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-box h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3d5a80;
}

body.dark-mode .filter-box {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .filter-box h3 {
  color: #f1f5f9;
}

.filter-group {
    margin-bottom: 20px;
}

label {
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: #5b7fa8;
}

body.dark-mode label {
  color: #cbd5e1;
}

select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #3d5a80;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

body.dark-mode select {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
}

body.dark-mode select:hover {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.2);
}

body.dark-mode select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

body.dark-mode select option {
  background: #1e293b;
  color: #f1f5f9;
}

select:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

select option {
    background: #ffffff;
    color: #3d5a80;
    padding: 12px 8px;
    font-weight: 500;
}

select option:hover {
    background: #f8fafc;
    color: #3b82f6;
}

select option:checked {
    background: #eff6ff;
    color: #3b82f6;
    font-weight: 600;
}

select.select-flash {
    border-color: rgba(102, 126, 234, 0.9);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.35), 0 0 18px rgba(102, 126, 234, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 244, 255, 0.95));
}

body.dark-mode select.select-flash {
    border-color: rgba(96, 165, 250, 0.75);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2), 0 0 18px rgba(96, 165, 250, 0.25);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
}

.reg-info {
  transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.35s ease;
}

.reg-info.flash {
  animation: regFlash 700ms cubic-bezier(.2,.8,.2,1);
}

@keyframes regFlash {
  0% { transform: translateY(-8px); opacity: 0.6; box-shadow: 0 6px 20px rgba(102,126,234,0.12); }
  50% { transform: translateY(0); opacity: 1; box-shadow: 0 10px 45px rgba(102,126,234,0.18); }
  100% { transform: translateY(0); opacity: 1; box-shadow: none; }
}

/* Toast notifications */
.toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1200;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 360px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  transform: translateY(8px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  font-weight: 600;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { background: linear-gradient(90deg, rgba(34,197,94,0.92), rgba(16,185,129,0.9)); }
.toast.error { background: linear-gradient(90deg, rgba(239,68,68,0.92), rgba(220,38,38,0.9)); }

.search-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    text-transform: uppercase;
    margin-top: 24px;
}

.search-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

body.dark-mode .search-btn {
  background: #60a5fa;
}

body.dark-mode .search-btn:hover {
  background: #3b82f6;
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

.content-area {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #dbeafe;
    border-radius: 16px;
    padding: 60px 24px;
    color: #3d5a80;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.06);
}

.empty-state.hidden {
    display: none !important;
}

.empty-state i {
    font-size: 56px;
    color: #3b82f6;
}

.empty-state h3 {
    font-size: 22px;
    color: #1f2937;
}

.empty-state p {
    font-size: 15px;
    color: #5b7fa8;
    margin: 0;
}

body.dark-mode .empty-state {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(96, 165, 250, 0.4);
    color: #e2e8f0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .empty-state i {
    color: #93c5fd;
}

body.dark-mode .empty-state h3 {
    color: #e5e7eb;
}

body.dark-mode .empty-state p {
    color: #cbd5e1;
}

.section {
    background: #ffffff;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.5s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark-mode .section {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.section.active {
    background: #ffffff;
    border: 2px solid #3b82f6;
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

body.dark-mode .section.active {
  background: rgba(30, 41, 59, 0.8);
  border-color: #60a5fa;
  box-shadow: 0 8px 24px rgba(96, 165, 250, 0.3);
}

.section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    color: #3d5a80;
}

body.dark-mode .section h2 {
  color: #f1f5f9;
}

.section.active h2 {
    font-size: 32px;
    color: #3b82f6;
}

body.dark-mode .section.active h2 {
  color: #60a5fa;
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
}

.note-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    color: #3d5a80;
    width: 100%;
}

body.dark-mode .note-card {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

.note-card:hover {
    background: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

body.dark-mode .note-card:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: #60a5fa;
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.3);
  color: #fff;
}

footer {
    background: #f8fafc;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    border-top: 1px solid #e2e8f0;
    font-size: 14px;
    color: #5b7fa8;
}

body.dark-mode footer {
  background: rgba(15, 23, 42, 0.8);
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet devices (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 30px 30px;
        gap: 30px;
    }

    .filter-box {
        position: static;
        width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    header {
        padding: 16px 30px;
        flex-wrap: nowrap;
    }

    .logo {
        font-size: 20px;
    }

    .back-btn {
        font-size: 13px;
        padding: 8px 14px;
    }

    .page-header {
        padding: 40px 30px;
    }

    .page-header h1 {
        font-size: 36px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .page-header p {
        font-size: 16px;
        margin-top: 8px;
    }

    .reg-info {
        font-size: 16px;
        padding: 8px 16px;
    }

    .section {
        padding: 28px;
    }

    .section h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .cards-row {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 14px;
        max-width: 100%;
    }

    .note-card {
        padding: 16px 12px;
        font-size: 14px;
        min-height: 75px;
        max-width: 100%;
    }

    footer {
        padding: 25px 30px;
        font-size: 13px;
    }
}

/* Mobile devices (up to 767px) */
@media (max-width: 767px) {
    header {
        padding: 14px 16px;
        flex-wrap: nowrap;
        gap: 8px;
        justify-content: space-between;
    }

    .logo {
        font-size: 18px;
        gap: 6px;
    }

    .logo i {
        font-size: 18px;
    }

    .back-btn {
        font-size: 12px;
        padding: 7px 12px;
        gap: 5px;
        white-space: nowrap;
    }

    .back-btn i {
        font-size: 12px;
    }

    .page-header {
        padding: 30px 16px;
    }

    .page-header h1 {
        font-size: 26px;
        flex-direction: column;
        gap: 8px;
        line-height: 1.3;
    }

    .page-header h1 i {
        font-size: 26px;
    }

    .page-header p {
        font-size: 15px;
        line-height: 1.5;
        margin-top: 10px;
        padding: 0 10px;
    }

    .reg-info {
        font-size: 14px;
        padding: 8px 14px;
        margin-top: 16px;
    }

    .main-content {
        padding: 20px 16px;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .filter-box {
        position: static;
        width: 100%;
        padding: 18px;
        margin-bottom: 0;
    }

    .filter-box h3 {
        font-size: 17px;
        margin-bottom: 16px;
    }

    .filter-group {
        margin-bottom: 16px;
    }

    .filter-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .filter-group select {
        font-size: 14px;
        padding: 10px 12px;
    }

    .search-btn {
        font-size: 13px;
        padding: 10px;
        margin-top: 20px;
    }

    .section {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .section h2 {
        font-size: 22px;
        margin-bottom: 18px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .section h2 i {
        font-size: 22px;
    }

    .section.active h2 {
        font-size: 24px;
    }

    .cards-row {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
        max-width: 100%;
    }

    .note-card {
        padding: 14px 10px;
        font-size: 13px;
        min-height: 70px;
        max-width: 100%;
        border-radius: 10px;
        line-height: 1.4;
    }

    .download-btn,
    .view-btn {
        font-size: 12px;
        padding: 8px 14px;
    }

    .empty-state {
        padding: 50px 20px;
    }

    .empty-state i {
        font-size: 48px;
    }

    .empty-state h3 {
        font-size: 20px;
        margin-top: 16px;
    }

    .empty-state p {
        font-size: 14px;
        margin-top: 8px;
    }

    footer {
        padding: 24px 16px;
        margin-top: 40px;
        font-size: 13px;
        line-height: 1.6;
    }

    .toast-container {
        right: 16px;
        bottom: 16px;
        max-width: calc(100vw - 32px);
    }

    .toast {
        min-width: 200px;
        max-width: 100%;
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* Very small mobile devices (320px - 480px) */
@media (max-width: 480px) {
    header {
        padding: 12px 12px;
    }

    .logo {
        font-size: 16px;
        gap: 5px;
    }

    .logo i {
        font-size: 16px;
    }

    .back-btn {
        font-size: 11px;
        padding: 6px 10px;
        gap: 4px;
    }

    .back-btn i {
        font-size: 11px;
    }

    .page-header {
        padding: 25px 12px;
    }

    .page-header h1 {
        font-size: 22px;
        gap: 6px;
    }

    .page-header h1 i {
        font-size: 22px;
    }

    .page-header p {
        font-size: 13px;
        padding: 0 5px;
    }

    .reg-info {
        font-size: 12px;
        padding: 7px 12px;
        gap: 6px;
    }

    .main-content {
        padding: 16px 12px;
        gap: 20px;
    }

    .filter-box {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .filter-box h3 {
        font-size: 16px;
    }

    .filter-group {
        margin-bottom: 14px;
    }

    .filter-group label {
        font-size: 11px;
    }

    .filter-group select {
        font-size: 13px;
        padding: 9px 10px;
    }

    .search-btn {
        font-size: 12px;
        padding: 9px;
        margin-top: 16px;
    }

    .section {
        padding: 16px 12px;
        border-radius: 14px;
    }

    .section h2 {
        font-size: 20px;
        margin-bottom: 16px;
        gap: 6px;
    }

    .section h2 i {
        font-size: 20px;
    }

    .section.active h2 {
        font-size: 22px;
    }

    .cards-row {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 10px;
    }

    .note-card {
        padding: 12px 8px;
        font-size: 12px;
        min-height: 65px;
        border-radius: 8px;
        line-height: 1.3;
    }

    .download-btn,
    .view-btn {
        font-size: 11px;
        padding: 7px 12px;
    }

    .empty-state {
        padding: 40px 16px;
    }

    .empty-state i {
        font-size: 42px;
    }

    .empty-state h3 {
        font-size: 18px;
    }

    .empty-state p {
        font-size: 13px;
    }

    footer {
        padding: 20px 12px;
        margin-top: 35px;
        font-size: 12px;
    }

    .toast-container {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
    }

    .toast {
        min-width: 180px;
        font-size: 12px;
        padding: 9px 11px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .page-header {
        padding: 16px 16px;
    }

    .page-header h1 {
        font-size: 20px;
        flex-direction: row;
        gap: 8px;
    }

    .page-header p {
        font-size: 13px;
        margin-top: 6px;
    }

    .reg-info {
        font-size: 12px;
        padding: 6px 12px;
        margin-top: 10px;
    }

    .main-content {
        padding: 16px;
        gap: 20px;
    }

    .section {
        padding: 18px;
    }

    .section h2 {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .cards-row {
        gap: 10px;
    }

    .note-card {
        min-height: 60px;
        padding: 10px 8px;
        font-size: 12px;
    }

    footer {
        padding: 16px;
        margin-top: 30px;
    }
}

/* Large desktop (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

    .main-content {
        max-width: 1400px;
        margin: 0 auto;
    }

    .cards-row {
        grid-template-columns: repeat(4, 1fr);
    }
}