/* style.css */
:root {
    --primary-color: #FF6B00; /* Vibrant Orange */
    --primary-hover: #E65C00;
    --text-main: #111111; /* Deep Black */
    --text-muted: #666666;
    --bg-main: #F4F5F7; /* Very light gray to make white cards pop */
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 24px rgba(255, 107, 0, 0.15);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    color: var(--text-main);
}

.logo i {
    color: var(--primary-color);
    font-size: 28px;
}

.logo span {
    font-weight: 300;
}

.logo span b {
    font-weight: 700;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 32px 24px;
}

.nav-title {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.nav-link i {
    font-size: 20px;
}

.nav-link:hover {
    background-color: var(--bg-main);
    color: var(--text-main);
}

.nav-link.active {
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-plan {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin-right: auto;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.header-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.header-text p {
    color: var(--text-muted);
    font-size: 16px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    padding: 12px 16px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    width: 300px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.search-bar i {
    color: var(--text-muted);
    font-size: 20px;
    margin-right: 8px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
}

/* Materials Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.material-count {
    background-color: var(--bg-card);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Card Styling */
.pdf-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pdf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
}

.pdf-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 107, 0, 0.3);
}

.pdf-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.card-category {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-main);
}

.card-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--text-main);
    color: white;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    width: 100%;
}

.card-action:hover {
    background-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

/* Responsiveness */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
    }
    
    .logo span, .nav-link span, .nav-title, .user-info {
        display: none;
    }
    
    .nav-link {
        justify-content: center;
        padding: 16px;
    }
    
    .nav-link i {
        margin: 0;
        font-size: 24px;
    }
    
    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 24px;
    }
    
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    
    .search-bar {
        width: 100%;
    }
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    color: var(--border-color);
    margin-bottom: 16px;
}

/* Modal Overlay */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(17, 17, 17, 0.85); /* Dark transparent */
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.welcome-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.welcome-modal-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
}

.welcome-modal-overlay.active .welcome-modal-card {
    transform: translateY(0) scale(1);
}

.modal-icon i {
    font-size: 56px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.welcome-modal-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.welcome-modal-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.welcome-modal-card p strong {
    color: var(--text-main);
}

.link-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 8px 8px 16px;
    margin-bottom: 32px;
}

.link-text {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--text-main);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

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

.close-modal-btn {
    width: 100%;
    background-color: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal-btn:hover {
    background-color: var(--border-color);
}
