help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
basic-form
/
css
RSK World
basic-form
Basic Form Project - Modern Contact Form with Glassmorphism Design, Dark/Light Themes, Real-time Validation, Auto-save, and Complete Web Development Features
css
  • style.css12.1 KB
style.css
css/style.css
Raw Download
Find: Go to:
/*
 * Created by: Molla Samser & Rima Khatun
 * Website: https://rskworld.in/contact.php
 * Emails: help@rskworld.in, support@rskworld.in
 * Phone: +91 93305 39277
 * Year: 2026
 */

:root {
    /* Light Mode (Default) */
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #00cec9;
    --surface-color: rgba(255, 255, 255, 0.85);
    /* More glass-like */
    --text-color: #2d3436;
    --text-light: #636e72;
    --input-bg: transparent;
    /* For underline style */
    --input-border: #dfe6e9;
    /* Bottom border only */
    --error-color: #ff7675;
    --success-color: #00b894;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 20px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark-mode {
    /* Dark Mode Overrides */
    --surface-color: rgba(30, 30, 40, 0.85);
    --text-color: #dfe6e9;
    --text-light: #b2bec3;
    --input-bg: transparent;
    --input-border: #636e72;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

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

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(-45deg, #6c5ce7, #a29bfe, #00cec9, #6c5ce7);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-color);
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.theme-toggle:hover {
    background: rgba(108, 92, 231, 0.1);
    transform: rotate(15deg);
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 5px;
}


/* Background Decoration Cleanup (Removed static blobs) */
body::before,
body::after {
    content: none;
}

.form-wrapper {
    background: var(--surface-color);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform-style: preserve-3d;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

/* Neon Glow Effect */
.form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
    z-index: 10;
}



/* Grid Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.col-left {
    flex: 1;
    min-width: 300px;
}

.col-right {
    flex: 1.5;
    min-width: 300px;
}

h1,
h2,
h3 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.5px;
}

h1 {
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Contact Info Column */
.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}

.contact-info .info-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.contact-info .info-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.contact-info i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.contact-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* FAQ Section */
.faq-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--input-border);
}

.faq-section h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

details {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--input-border);
    padding-bottom: 10px;
}

summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    list-style: none;
    /* Hide default triangle */
    position: relative;
    padding-right: 20px;
}

summary::after {
    content: '+';
    position: absolute;
    right: 0;
    font-weight: bold;
    color: var(--primary-color);
}

details[open] summary::after {
    content: '-';
}

details p {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: var(--surface-color);
    color: var(--text-color);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--primary-color);
    min-width: 250px;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--error-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer Links */
.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.icon-container {
    width: 60px;
    height: 60px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: var(--primary-color);
}

h1 {
    font-weight: 600;
    margin-bottom: 10px;
}

header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    position: absolute;
    left: 40px;
    /* Updated from 45px for floating label alignment */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    transition: 0.3s ease;
    font-size: 1rem;
}

input:focus~label,
input:not(:placeholder-shown)~label,
textarea:focus~label,
textarea:not(:placeholder-shown)~label {
    top: -20px;
    left: 0;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
}

.input-field {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 10px;
}

/* Animated Underline */
.input-field::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: 0.4s ease;
}

.input-field:focus-within::after {
    width: 100%;
}

.input-field i {
    position: absolute;
    left: 0;
    color: var(--text-light);
    font-size: 1.1rem;
    transition: var(--transition);
    z-index: 1;
}

.input-field:focus-within i {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Modern Input Styles */
input,
textarea {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: none;
    border-bottom: 2px solid var(--input-border);
    border-radius: 0;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
    background: transparent;
    color: var(--text-color);
}

/* Floating Label Logic */
input:focus~label,
input:not(:placeholder-shown)~label,
textarea:focus~label,
textarea:not(:placeholder-shown)~label {
    top: -10px;
    left: 0;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: var(--surface-color);
    padding: 0 5px;
    font-weight: 600;
}


/* Textarea Adjustments */
.textarea-field i {
    top: 15px;
}

.textarea-field label {
    top: 25px;
    /* Adjust for textarea padding */
}

textarea:focus~label,
textarea:not(:placeholder-shown)~label {
    top: -10px;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Focus States */
input:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

input:focus+i,
textarea:focus+i,
.input-field:focus-within i {
    color: var(--primary-color);
}

/* Validation Styles */
.input-group.error input,
.input-group.error textarea {
    border-color: var(--error-color);
}

.input-group.success input,
.input-group.success textarea {
    border-color: var(--success-color);
}

.input-group.error i {
    color: var(--error-color);
}

.input-group.success i {
    color: var(--success-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
    height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.input-group.error .error-message {
    height: auto;
    margin-top: 5px;
}


/* Button Glow Animation */
@keyframes buttonPulse {
    0% {
        box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    }

    50% {
        box-shadow: 0 5px 25px rgba(108, 92, 231, 0.6);
    }

    100% {
        box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    }
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    background: #5649c0;
    transform: translateY(-2px);
    animation: buttonPulse 1.5s infinite;
}

.submit-btn:active {
    transform: translateY(0);
    animation: none;
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid #dfe6e9;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 30px;
    }

    .col-left,
    .col-right {
        flex: auto;
        width: 100%;
        min-width: 0;
    }

    .container {
        padding: 0 15px;
    }

    .form-wrapper {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .form-wrapper {
        padding: 25px 15px;
    }
}
630 lines•12.1 KB
css

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer