/* style.css - Styling untuk OSEAN Tools Website */

/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #0f1b4c 0%, #2a5298 50%, #1a5f7a 100%);
    min-height: 100vh;
    padding-bottom: 35px;
}

/* Update Notification Styles */
.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(40, 167, 69, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.5s ease;
    max-width: 350px;
}

.notification-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.notification-content span {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.close-btn {
    background: transparent;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsive untuk notifikasi */
@media (max-width: 480px) {
    .update-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification-content {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .refresh-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Admin Panel Styles */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-content {
    background: rgba(30, 60, 114, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.admin-content h3 {
    color: white;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 1.5rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-form input {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    transition: all 0.3s ease;
}

.admin-form input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.admin-form button {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-form button:first-of-type {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.admin-form button:last-of-type {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.admin-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.admin-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.admin-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(10, 41, 75, 0.4);
}

/* Navbar Styles */
.navbar {
    background: rgba(16, 43, 93, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(14, 39, 86, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: -20px;
}

.nav-logo h2 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffffff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.nav-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-search {
    display: flex;
    align-items: center;
    margin-right: -10px;
}

.search-input {
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-size: 13px;
    width: 180px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    width: 220px;
}

.search-btn {
    display: none;
}

/* Main Content */
.main-content {
    margin-top: 50px;
    padding: 40px 20px 40px 20px;
    min-height: calc(100vh - 90px);
    margin-bottom: 30px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Tools Container */
.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 25px 35px;
    justify-content: center;
    justify-items: center;
    padding: 40px 0;
    max-width: 700px;
    margin: 0 auto;
}

/* Ketika pencarian aktif, pusatkan hasil */
.tools-container.searching {
    justify-content: center;
    justify-items: center;
    grid-template-columns: repeat(auto-fit, 120px);
    transition: all 0.2s ease;
}

/* Batasi maksimal 5 kolom per baris */
@media (min-width: 769px) {
    .tools-container {
        grid-template-columns: repeat(5, 120px);
        gap: 25px 40px;
    }
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.tool-box {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}



.tool-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.tool-icon {
    font-size: 2rem;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    border-radius: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tool-title {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 4px;
}

/* Footer */
.footer {
    background: rgba(7, 26, 60, 0.95);
    color: white;
    padding: 3px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.footer-content p {
    font-size: 0.7rem;
    margin: 0;
}

.footer-link {
    color: #fefefe;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.7rem;
}

.footer-link:hover {
    color: #c8ff00;
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}





/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        height: 50px;
        padding: 0 15px;
        justify-content: space-between;
        align-items: center;
        overflow: hidden;
    }

    .nav-logo {
        margin-left: -8px;
    }

    .nav-search {
        margin-right: -5px;
    }

    .nav-logo h2 {
        font-size: 1.1rem;
    }
    
    .nav-logo img {
        width: 26px;
        height: 26px;
    }

    .search-input {
        width: 140px;
        font-size: 12px;
    }

    .search-input:focus {
        width: 160px;
    }

    .main-content {
        margin-top: 50px;
        padding: 30px 15px 40px 15px;
        margin-bottom: 30px;
    }

    .tools-container {
        grid-template-columns: repeat(3, 120px);
        gap: 20px 30px;
        padding: 20px 0;
        max-width: 400px;
    }

    .tool-box {
        width: 80px;
        height: 80px;
    }

    .tool-icon {
        font-size: 1.5rem;
    }

    .tool-icon img {
        max-width: 45px;
        max-height: 45px;
    }

    .tool-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
        height: 50px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        overflow: hidden;
    }

    .nav-logo {
        margin-left: -3px;
    }

    .nav-search {
        margin-right: 0;
    }

    .nav-logo h2 {
        font-size: 1rem;
    }
    
    .nav-logo img {
        width: 22px;
        height: 22px;
    }

    .search-input {
        width: 110px;
        font-size: 11px;
    }

    .search-input:focus {
        width: 130px;
    }

    .tools-container {
        grid-template-columns: repeat(2, 100px);
        gap: 20px 25px;
        max-width: 250px;
    }

    .tool-box {
        width: 70px;
        height: 70px;
    }

    .tool-icon {
        font-size: 1.3rem;
    }
    
/* ukuran icon versi Mobile */
    .tool-icon img {
        max-width: 50px;
        max-height: 50px;
    }

    .tool-title {
        font-size: 0.75rem;
    }

    .main-content {
        margin-top: 50px;
        padding: 20px 10px 40px 10px;
        margin-bottom: 30px;
    }
}

/* Animasi Loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Efek Highlight untuk Pencarian */
.tool-item.highlighted {
    transform: scale(1.05);
}

/* Scrollbar Custom */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}