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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('images/background.jpg') no-repeat center center;
    background-size: cover;
    padding: 20px;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.login-form {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 48px 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 32px;
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.login-form .form-group label {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.modal .form-group label {
    color: #4a5568;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
    font-family: inherit;
}

.login-form .form-group input,
.login-form .form-group select,
.login-form .form-group textarea {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    border: 2px solid #e2e8f0;
    background-color: #ffffff;
    color: #2c3e50;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.login-form .form-group input:focus,
.login-form .form-group select:focus,
.login-form .form-group textarea:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #1e3c72;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

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

.btn-secondary {
    background: #718096;
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4a5568;
}

.error {
    color: #e53e3e;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

.success {
    color: #48bb78;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

/* Header Styles */
.header {
    background: #ffffff;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e2e8f0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-section h1 {
    color: #1e3c72;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: #2a5298;
    transform: scale(1.05);
}

/* Hamburger Menu Dropdown */
.profile-menu-container {
    position: relative;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: white;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: rotate(45deg);
}

.menu-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

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

.menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.menu-user-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.menu-user-details p {
    font-size: 12px;
    color: #718096;
    text-transform: capitalize;
}

.menu-items {
    padding: 8px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.menu-item:hover {
    background: #f7fafc;
    color: #2a5298;
}

.menu-item-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

.menu-item.logout {
    color: #e53e3e;
}

.menu-item.logout:hover {
    background: #fff5f5;
}

.user-info span {
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
}

.icon-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: #edf2f7;
    border-color: #2a5298;
}

.admin-btn {
    background: #2a5298;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: #1e3c72;
    transform: translateY(-1px);
}

.logout-btn {
    background: #fff;
    color: #e53e3e;
    padding: 10px 20px;
    border: 2px solid #e53e3e;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #e53e3e;
    color: white;
}

/* Search Section */
.controls-section {
    background: white;
    padding: 24px;
    border-radius: 8px;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}

.search-bar {
    display: flex;
    gap: 16px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 18px;
}

/* Section Styles */
.section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tools Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.project-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: #2a5298;
}

.thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 60, 114, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .thumbnail-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.overlay-text {
    font-size: 16px;
    font-weight: 600;
}

.tool-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.tool-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tool-action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.tool-action-btn.favorite.active {
    color: #f59e0b;
}

.status-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #48bb78;
}

.status-dot.offline {
    background: #e53e3e;
    animation: none;
}

.status-dot.unknown {
    background: #a0aec0;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.project-info {
    padding: 20px;
}

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

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 4px;
}

.project-description {
    color: #718096;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 16px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.project-url {
    font-size: 12px;
    color: #a0aec0;
    font-family: 'Courier New', monospace;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #48bb78;
    font-weight: 600;
}

.response-time {
    font-size: 11px;
    color: #a0aec0;
}

.no-tools-message {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.no-tools-message h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #4a5568;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 32px;
    border-radius: 8px;
    width: 90%;
    max-width: 540px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-content.large {
    max-width: 800px;
}

.modal-content h2 {
    color: #1e3c72;
    margin-bottom: 24px;
    font-size: 24px;
}

.close {
    color: #a0aec0;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #4a5568;
}

/* Profile Modal */
.profile-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
}

.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.profile-picture-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e2e8f0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 16px;
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .profile-container {
        grid-template-columns: 1fr;
    }
}

/* Forgot Password Link */
.forgot-password-link {
    text-align: center;
    margin-top: 16px;
}

.forgot-password-link a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.forgot-password-link a:hover {
    color: #e0e0e0;
    text-decoration: underline;
}

/* Signup Link */
.signup-link {
    text-align: center;
    margin-top: 10px;
}

.signup-link a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.signup-link a:hover {
    color: #e0e0e0;
    text-decoration: underline;
    opacity: 1;
}

/* Error and Success Messages */
.error {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

.success {
    color: #38a169;
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

/* Video Section */
.video-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 2px solid #2a5298;
    grid-column: span 2;
    position: relative;
}

.video-card-player {
    width: 100%;
    height: 100%;
    min-height: 360px;
}

@media (max-width: 1200px) {
    .video-card {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .video-card {
        grid-column: span 1;
    }
    
    .video-card-player {
        min-height: 240px;
    }
}
