/* Custom styles for PHP Blog */

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3b82f6;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    color: #6b7280;
}

.theme-toggle:hover {
    background-color: #f3f4f6;
}

/* Loader animation */
.loader {
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar hiding for carousel */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Thumbnail preview */
.thumbnail-preview {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Post cards */
.post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Carousel items */
.carousel-item {
    transition: transform 0.3s ease;
}

.carousel-item:hover {
    transform: scale(1.02);
}

/* Tag styling */
.tag {
    transition: all 0.2s ease;
}

.tag:hover {
    transform: translateY(-1px);
}

/* Modal animations */
.modal-enter {
    opacity: 0;
    transform: scale(0.9);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Code block enhancements */
.code-block {
    transition: box-shadow 0.2s ease;
}

.code-block:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image description */
.image-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .theme-toggle {
    color: #d1d5db;
}

[data-theme="dark"] .theme-toggle:hover {
    background-color: #374151;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom scrollbar for code blocks */
pre::-webkit-scrollbar {
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: #1f2937;
}

pre::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

footer a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s;
}
footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.footer-copyright a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s;
}
.footer-copyright a:hover {
    color: #2563eb !important;
    text-decoration: underline;
}

html, body {
    height: 100%;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
footer {
    margin-top: auto;
} 