/* Custom Application Styles */

[x-cloak] {
    display: none !important;
}

/* Learning Goal Details & Course Cards */
.goal-header {
    background: linear-gradient(135deg, #5d87ff 0%, #49beff 100%);
    border-radius: 20px;
    color: white;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.goal-card-premium {
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: white;
}

.goal-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: #5d87ff;
}

.goal-card-premium .card-title a {
    color: #1e293b;
    transition: color 0.2s;
}

.goal-card-premium .card-title a:hover {
    color: #5d87ff;
}

.goal-badge-status {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 50px;
}

.goal-header::after {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.breadcrumb-goal .breadcrumb-item + .breadcrumb-item::before {
    content: "•";
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
    padding: 0 10px;
}

.btn-goal-header {
    background-color: white;
    color: #5d87ff !important;
    border: none;
    transition: all 0.3s ease;
}

.btn-goal-header:hover {
    background-color: #ecf2ff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-goal-header-outline {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.btn-goal-header-outline:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.badge-goal-status {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding: 8px 16px !important;
}

.stat-card {
    transition: transform 0.2s;
    border: none;
    border-radius: 15px;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.course-card {
    border-radius: 15px;
    border: 1px solid #e5eae2;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.course-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: #5d87ff;
}

.platform-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(93, 135, 255, 0.1);
    color: #5d87ff;
    font-weight: 600;
}

.progress-custom {
    height: 8px;
    border-radius: 10px;
}

.btn-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s;
    color: #5d87ff;
}

.btn-action:hover {
    background-color: #5d87ff;
    color: white !important;
}

.hover-primary:hover {
    color: #5d87ff !important;
}

.btn-icon-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

.btn-icon-action:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-icon-action.text-info:hover {
    background-color: rgba(0, 184, 217, 0.1);
}

.btn-icon-action.text-warning:hover {
    background-color: rgba(255, 171, 0, 0.1);
}

/* List View Overrides */
.list-view .course-item {
    transition: all 0.3s ease;
}

.list-view .course-card .card-body {
    flex-direction: row !important;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem !important;
}

.list-view .course-header-row {
    margin-bottom: 0 !important;
    order: 1;
    width: auto;
    display: contents !important;
}

.list-view .platform-badge {
    order: 1;
    min-width: 80px;
    text-align: center;
}

.list-view .course-content-wrapper {
    order: 2;
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0 !important;
}

.list-view .options-dropdown {
    order: 4;
    margin-left: auto;
}

.list-view .course-title {
    margin-bottom: 0 !important;
    width: 25%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-view .progress-container {
    margin-bottom: 0 !important;
    width: 30%;
}

.list-view .stats-row {
    margin-bottom: 0 !important;
    width: 25%;
}

.list-view .action-buttons {
    order: 3;
    margin-top: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    width: auto;
}

.list-view .btn-action {
    width: 35px;
    height: 35px;
}

.list-view .action-text {
    display: none;
}

@media (max-width: 991px) {
    .list-view .course-card .card-body {
        flex-direction: column !important;
        align-items: stretch;
    }
    .list-view .course-content-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .list-view .course-title, 
    .list-view .progress-container, 
    .list-view .stats-row {
        width: 100%;
    }
    .list-view .action-text {
        display: inline;
    }
}

/* Courses Library Redesign */
.library-header {
    background: linear-gradient(135deg, #1e4db7 0%, #5d87ff 100%);
    border-radius: 20px;
    color: white;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
}

.table-container-premium {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.table-premium thead th {
    background: #f8fafc;
    border-bottom: 1px solid #eef2f6;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
}

.table-premium tbody tr {
    transition: all 0.2s ease;
}

.table-premium tbody tr:hover {
    background-color: #f1f5f9;
}

.table-premium td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.course-link {
    color: #1e293b;
    font-weight: 600;
    transition: color 0.2s;
}

.course-link:hover {
    color: #5d87ff;
}

.goal-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.goal-link:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.search-premium {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.search-premium:focus {
    border-color: #5d87ff;
    box-shadow: 0 0 0 4px rgba(93, 135, 255, 0.1);
}

/* Dashboard Redesign */
.hello-card {
    background: linear-gradient(135deg, #1e4db7 0%, #5d87ff 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hello-card::before {
    content: "";
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.dashboard-stat-card {
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.icon-box-glass {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.timeline-widget-premium .timeline-item {
    padding-bottom: 25px;
}

.timeline-widget-premium .timeline-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #5d87ff;
    position: relative;
    z-index: 2;
    margin-top: 5px;
}

.timeline-widget-premium .timeline-badge::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(93, 135, 255, 0.1);
    border-radius: 50%;
}

.achievement-item-premium {
    background: #f8fafc;
    border-radius: 15px;
    padding: 1.25rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.achievement-item-premium:hover {
    background: white;
    border-color: #5d87ff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Daily Logs Redesign */
.log-card-premium {
    border-radius: 15px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    background: white;
}

.log-card-premium:hover {
    border-color: #5d87ff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.mood-badge {
    font-size: 1.25rem;
    line-height: 1;
    padding: 4px;
    border-radius: 8px;
    background: #f8fafc;
}

.timeline-date-box {
    min-width: 100px;
    padding-right: 1.5rem;
}

/* Flashcard Study */
.flashcard-container {
    perspective: 1000px;
}

.flashcard {
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.flashcard.flipped { 
    transform: rotateY(180deg); 
}

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flashcard-back {
    transform: rotateY(180deg);
}
