/* Genel Stil Ayarları */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Yıldız arka planı */
#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    animation: twinkle var(--duration, 3s) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Statik yıldızlar (main sayfası için) */
.static-star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
}

/* Renkli parçacık sistemi */
#particle-system {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.floating-particle {
    position: absolute;
    border-radius: 50%;
    animation: floatAround linear infinite;
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(100px, 50px) rotate(90deg);
    }
    50% {
        transform: translate(200px, 0) rotate(180deg);
    }
    75% {
        transform: translate(100px, -50px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Giriş Sayfası Stilleri */
.landing-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
}

.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Atom animasyonu */
.atom {
    position: absolute;
    top: 15%;
    left: 10%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.3);
    animation: rotateAtom 20s infinite linear;
}

.atom .electron {
    position: absolute;
    width: 15px;
    height: 15px;
    background: #00ffff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbit 5s infinite linear;
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

.atom .electron:nth-child(2) {
    animation-delay: 1s;
}

.atom .electron:nth-child(3) {
    animation-delay: 2s;
}

.atom .nucleus {
    position: absolute;
    width: 25px;
    height: 25px;
    background: #ff2d75;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px #ff2d75, 0 0 30px #ff2d75;
}

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

@keyframes orbit {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(30px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(30px) rotate(-360deg); }
}

/* Dalga animasyonu */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 150px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="rgba(0, 255, 255, 0.1)"></path></svg>');
    background-size: 50% 100%;
    animation: waveAnimation 10s infinite linear;
}

@keyframes waveAnimation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Parçacık animasyonu */
.particle {
    position: absolute;
    background: rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.particle:nth-child(1) {
    width: 8px;
    height: 8px;
    top: 25%;
    right: 15%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 12px;
    height: 12px;
    top: 60%;
    left: 15%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 6px;
    height: 6px;
    bottom: 20%;
    right: 30%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 10px;
    height: 10px;
    top: 40%;
    left: 25%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    width: 5px;
    height: 5px;
    bottom: 30%;
    left: 40%;
    animation-delay: 3s;
}

/* Işık ışını animasyonu */
.light-ray {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.7), transparent);
    animation: lightRay 3s infinite linear;
    transform-origin: left center;
}

.light-ray:nth-child(1) {
    top: 20%;
    left: 70%;
    width: 120px;
    animation-delay: 0s;
    transform: rotate(30deg);
}

.light-ray:nth-child(2) {
    top: 60%;
    left: 80%;
    width: 150px;
    animation-delay: 1s;
    transform: rotate(120deg);
}

.light-ray:nth-child(3) {
    top: 40%;
    left: 20%;
    width: 140px;
    animation-delay: 2s;
    transform: rotate(210deg);
}

@keyframes lightRay {
    0% { opacity: 0; transform: scaleX(0) rotate(0deg); }
    50% { opacity: 1; transform: scaleX(1) rotate(180deg); }
    100% { opacity: 0; transform: scaleX(0) rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(20px); }
    50% { transform: translateY(10px) translateX(-15px); }
    75% { transform: translateY(-15px) translateX(-10px); }
}

/* İçerik Stilleri */
.content {
    text-align: center;
    z-index: 10;
    max-width: 900px;
    padding: 20px;
    animation: fadeIn 1s ease-out;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #00ffff, #00ff9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    letter-spacing: 2px;
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(0, 255, 255, 0.5); }
    to { text-shadow: 0 0 30px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.6); }
}

.subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: #a0a0d0;
    animation: slideIn 1s ease-out 0.3s both;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Özellik kartları */
.features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
    width: 100%;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px 15px;
    width: 160px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out 0.6s both;
    flex: 1 1 160px;
    max-width: 160px;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
}

.feature-card i {
    font-size: 2rem;
    color: #00ffff;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.85rem;
    color: #a0a0d0;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* İstatistikler */
.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    animation: fadeIn 1s ease-out 1.2s both;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00ffff, #00ff9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #a0a0d0;
    margin-top: 5px;
}

.cta-button {
    background: linear-gradient(90deg, #00ffff, #00ff9d);
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #16213e;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    animation: pulse 2s infinite;
    margin-top: 20px;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.7);
    animation: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.5); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 255, 0.8); }
    100% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.5); }
}

/* Ana Sayfa Stilleri */
.main-page {
    padding: 20px;
    min-height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

header .logo h1 {
    font-size: 2rem;
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #a0a0d0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #00ffff;
}

.search-container {
    text-align: center;
    margin-bottom: 40px;
}

.search-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #00ffff;
}

.search-box {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

#search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px 0 0 50px;
    color: white;
    font-size: 1rem;
    outline: none;
}

#search-input::placeholder {
    color: #a0a0d0;
}

#search-button {
    padding: 15px 30px;
    background: linear-gradient(90deg, #00ffff, #00ff9d);
    color: #16213e;
    border: none;
    border-radius: 0 50px 50px 0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#search-button:hover {
    background: linear-gradient(90deg, #00ff9d, #00ffff);
}

/* Formül Kartları */
.formulas-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-bottom: 50px;
}

.formula-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.formula-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
}

.formula-symbol {
    font-size: 1.8rem;
    color: #00ffff;
    margin-bottom: 10px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.formula-name {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: white;
}

.formula-description {
    color: #a0a0d0;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

.calculate-button {
    background: rgba(0, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
}

.calculate-button:hover {
    background: rgba(0, 255, 255, 0.4);
}

/* Modal Stilleri */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    position: relative;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover,
.close:focus {
    color: #00ffff;
}

.formula-detail-symbol {
    font-size: 2.5rem;
    color: #00ffff;
    text-align: center;
    margin-bottom: 20px;
}

.formula-detail-name {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 10px;
}

.formula-detail-description {
    color: #a0a0d0;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.formula-usage {
    background: rgba(0, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.formula-usage h3 {
    color: #00ffff;
    margin-bottom: 15px;
    text-align: center;
}

.calculation-area {
    margin-top: 30px;
}

.calculation-area h3 {
    color: #00ffff;
    margin-bottom: 20px;
    text-align: center;
}

.variables-input {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.variable-input {
    flex: 1;
    min-width: 200px;
}

.variable-input label {
    display: block;
    margin-bottom: 5px;
    color: #a0a0d0;
}

.variable-input input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
}

.calculate-result-button {
    background: linear-gradient(90deg, #00ffff, #00ff9d);
    color: #16213e;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.calculate-result-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

.result-area {
    margin-top: 20px;
    padding: 20px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    display: none;
}

.result-area h3 {
    color: #00ffff;
    margin-bottom: 10px;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .atom {
        width: 60px;
        height: 60px;
        top: 15%;
        left: 5%;
    }
    
    .atom .electron {
        width: 12px;
        height: 12px;
    }
    
    .atom .nucleus {
        width: 20px;
        height: 20px;
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 20px;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    #search-input {
        border-radius: 50px;
        margin-bottom: 10px;
    }
    
    #search-button {
        border-radius: 50px;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        padding: 20px;
    }
    
    .formulas-container {
        grid-template-columns: 1fr;
    }
    
    .variables-input {
        flex-direction: column;
    }
    
    .variable-input {
        min-width: 100%;
    }
    
    .features {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .feature-card {
        width: 80%;
        max-width: none;
        flex: 1;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .wave {
        height: 100px;
    }
    
    .light-ray {
        display: none;
    }
    
    .floating-particle {
        animation-duration: calc(var(--duration, 10s) * 2) !important;
    }
    
    .main-page {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 15px;
    }
    
    .landing-page {
        padding: 10px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .search-container h2 {
        font-size: 1.5rem;
    }
    
    .formula-symbol {
        font-size: 1.5rem;
    }
    
    .formula-name {
        font-size: 1.1rem;
    }
    
    .formula-detail-symbol {
        font-size: 2rem;
    }
    
    .formula-detail-name {
        font-size: 1.5rem;
    }
    
    .features {
        margin: 30px 0;
    }
    
    .feature-card {
        width: 90%;
        padding: 15px 10px;
    }
    
    .feature-card i {
        font-size: 1.8rem;
    }
    
    .feature-card h3 {
        font-size: 1rem;
    }
    
    .feature-card p {
        font-size: 0.8rem;
    }
    
    .stats {
        gap: 15px;
        margin-top: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .particle {
        display: none;
    }
    
    .wave {
        height: 80px;
    }
    
    /* Mobilde daha az yıldız ve parçacık */
    .star {
        width: calc(var(--size, 1px) * 0.7) !important;
        height: calc(var(--size, 1px) * 0.7) !important;
    }
    
    .formulas-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .formula-card {
        padding: 15px;
    }
    
    .search-container h2 {
        font-size: 1.3rem;
    }
    
    .search-box {
        max-width: 100%;
    }
}